Answer to Question #23736 in C++ for EMMANUEL
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.
1
2013-02-05T09:12:37-0500
#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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment