Hi i'm new with C++ programming and i have given a school work to creat a program that the user will input 3 numbers and the out put will be arrange in descending orders and i can only used the if else or nested if else statement..
so here's the problem out the 6 combination im only getting 4 correct answers.. pls help me here is the code i made...
Before we go any further, I can't help but notice that several of your if conditions match (see: if #2 and if #6, if #1 and if #5). You might want to iron that out.
Also, check if #4. There's something wonky with that one.
Finally, please replace void main() with int main(). void main(), though some compilers support it, is illegal. :/
int main()
{
short num1,num2,num3;
char x[] = "The numbers in order: ";
cout << "Give me three numbers. "<<endl<<endl;
cout << "Input the first number and press Enter: ";
cin >> num1;
cout << "Input the second number and press Enter: ";
cin >> num2;
cout << "Input the third number and press Enter: ";
cin >> num3;