diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 259148f..0000000 --- a/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..58cd46d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: cpp +os: linux +script: + - make diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d03a55 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +all: + g++ -Wfatal-errors main.cpp diff --git a/README.md b/README.md new file mode 100644 index 0000000..b7135d1 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +[![Build Status](https://travis-ci.com/krasmussen3/Trio.svg?branch=master)](https://travis-ci.com/krasmussen3/Trio) +# Trio + +This C++ program receives three integers and tells the user the numbers in descending (largest-to-smallest) order. + +## Getting Started + +To run the program do the following in your command line interface prompt ($): + +``` +$make +$./a.out +``` diff --git a/main.cpp b/main.cpp index f0c6f48..3f57bb3 100644 --- a/main.cpp +++ b/main.cpp @@ -1,25 +1,56 @@ #include -using namespace std; +using std::cout; +using std::cin; +using std::endl; + +void sortDescending(int&,int&,int&); +void swap(int&,int&); // <-- ADD YOUR FUNCTION PROTOTYPE HERE int main() { - //DO NOT CHANGE WITHIN THIS AREA... - int red, blue, green; - cout<<"Enter Red, Green, and Blue values: "; - cin>>red>>green>>blue; - //...END OF "DO NOT CHANGE" AREA + //Takes user input and stores in int variables + int numA, numB, numC; + cout<<"Enter any three numbers: "; + cin>>numA>>numB>>numC; + + //Number sorting Function + sortDescending(numA, numB, numC); + //Outputs sorted numbers to the user + cout<<"From greatest to least, they are: "; + cout<