Hey guys !
I need a program that asks for 3 numbers, if the first one is smaller then the second and the second is smaller then the third then the program write True and if not it write False.
For some reason...it writes both of the options as true, no matter what numbers i put in.
#include <iostream>
#include <cmath>
usingnamespace std;
int main()
{
double a, b, c;
cout << "Please enter 3 numbers, the program will determine if they are in correct order\n";
cin >> a >> b >> c;
if (a < b < c)
cout << "The numbers are in order\n";
if (a > b < c)
cout << "The numbers are not in order" << endl;
if (a > b > c)
cout << "The numbers are not in order" << endl;
return 0;
}