63 845
Assignments Done
99,2%
Successfully Done
In August 2018

Answer to Question #23736 in C++ for EMMANUEL

Question #23736
write a program which inputs three numbers and outputs the message SORTED if the numbers are in ascending order, and output NOT SORTED if otherwise.
Expert's answer
#include <conio.h>
#include <iostream>

using namespace std;

void main()
{
int a, b, c;
cout << "Input 3 numbers: ";
cin >> a >> b >> c;

if (c > b && b > a)
cout << "SORTED" << endl;
else
cout << "NOT SORTED" << endl;
_getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions