The program must accept four alphabets as the input. If the four alphabets are in alphabetical order print YES as the output. Else print NO as the output.
Example Input/Output 1:
Input:
a c e r
Output:
YES
solution:
int main()
{
char a,b,c,d;
scanf("%c %c %c %c",&a,&b,&c,&d);
if(a<b&&b<c&&c<d){
printf("yes");
}
else{
printf("no");
}
}
No comments:
Post a Comment