Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- int main()
- {
- int a,b,c,d,e,f,x,i=1;
- while (i>0){
- scanf("%d",&x);
- a=x%10;
- b=x/10%10;
- c=x/100%10;
- d=x/1000%10;
- e=x/10000%10;
- f=x/100000%10;
- if (a>b && b<c && c>d && d<e && e>f){
- printf("%d",x);
- }
- else if (a<b && b>c && c<d && d>e && e<f){
- printf("%d",x);
- }else if (x='k'){
- i=0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement