Advertisement
kaloon

Parni

Nov 4th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int a,b;
  7.     int k=1;
  8.     int pog,pom;
  9.     int tocno=0;
  10.     scanf("%d%d",&a,&b);
  11.     if(a>b){
  12.         pog=a;
  13.         pom=b;
  14.     }else
  15.     {
  16.         pog=b;
  17.         pom=a;
  18.     }
  19.         int temp=pog;
  20.         int temp2=pom;
  21.         while(temp){
  22.             temp/=10;
  23.             if(k==1){
  24.                 if(temp%10==temp2%10){
  25.                     tocno=1;
  26.                 }else{
  27.                     tocno=0;
  28.                     break;
  29.                 }
  30.                 temp2/=10;
  31.             }
  32.             k*=-1;
  33.     }
  34.     if(tocno){
  35.         printf("paren");
  36.     }else
  37.         printf("ne");
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement