#include <stdio.h>
int main() {
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a<=b&&b<=c){
printf("YES");
}
else{
printf("NO");
}
return 0;
}
This code reads three integers and checks if they are in non-decreasing order (a <= b <= c). It prints "YES" if true, otherwise "NO".
- The condition checks if the sequence is sorted in ascending order, but the problem might require checking if the numbers can form a triangle (sum of any two sides greater than the third). Consider what the actual task is.
- If the goal is triangle validation, the condition should compare sums of pairs, not just order. For example, check a + b > c, a + c > b, and b + c > a.