Solution of URI 1113::Ascending and Descending
Before seeing the solution make sure that you have tried enough. Don’t copy the whole code, just find out the logic. If you feel any problem, you will inform me by comment.
#include <stdio.h>
int main()
{
int X,Y;
while(scanf("%d%d",&X,&Y) !=EOF) {
if(X==Y) {
return 0;
}
else if(X>Y) {
printf("Decrescente\n");
}
else if(X<Y) {
printf("Crescente\n");
}
}
return 0;
}
No comments