Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.     int n,i,l,j;
  6.  
  7.     scanf("%d", &n);
  8.     char string[8];
  9.     char s1[7]= {"mumble"};
  10.     for(j=0; j<n; j++)
  11.     {
  12.         scanf("%s", string);
  13.         l=strcmp(string,s1);
  14.         if (l!=0)
  15.         {
  16.             int a=atoi(string);
  17.             if (a!=(j+1))
  18.             {
  19.                 printf("not ok");
  20.                 return 0;
  21.             }
  22.  
  23.         }
  24.     }
  25.     printf("ok");
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement