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/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..78ed664 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# 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 a4ade7a..0912a25 100644 --- a/main.cpp +++ b/main.cpp @@ -1,21 +1,43 @@ #include -using namespace std; +using std::cout; +using std::cin; +using std::endl; + +void sortDescending(int,int,int); +void swap(int&,int&); 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 - - + int numA, numB, numC; + cout<<"Enter any three numbers: "; + cin>>numA>>numB>>numC; + sortDescending(numA, numB, numC); + + cout<<"From greatest to least, they are: "; + cout<