Wednesday, December 9, 2009

c heldeer hii gesen biedaalt

#include "stdio.h"
#include "stdlib.h"
int main()
{
int n,a,b,s,d,z,x;
scanf("%d",&n);
if(n<10000&&n>=1000){a=n/100;
b=a/10;
x=a%10;
s=n%100;
d=s%10;
z=s/10;
if((x+b)==(d+z))printf("YES");
else printf("NO");
}
system("PAUSE");
return 0;
}

#include "stdio.h"
#include "stdlib.h"
int main()
{
int n;
scanf("%d",&n);
int d1=n%10;
n/=10;
int d2=n%10;
n/=10;
int d3=n%10;
int d4=n/10;
if((d1==d4)&&(d2=d3))
printf("YES");
else printf("NO");
system("PAUSE");
return 0;
}

No comments:

Post a Comment