Write a program that reads three numbers x y and z from the

Write a program that reads three numbers x, y, and z from the user. The program should output whether the numbers are in increasing order, decreasing order, or not in order. # include using namespace std; int main () {//write your code below:

Solution

#include<iostream>
using namespace std;
int main()
{
int x,y,z;
cout<<\"enter 3 numbers :\";
cin>>x>>y>>z;
if(x<y&&y<z)
cout<<\"\ numbers are in ascending order\";
else if(x>y&&y>z)
cout<<\"\ numbers are in descending order\";
else cout<<\"\ not in order\";
return 0;
}

 Write a program that reads three numbers x, y, and z from the user. The program should output whether the numbers are in increasing order, decreasing order, or

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site