
22-01-2006, 17:11
|
|
|
|
חבר מתאריך: 22.01.06
הודעות: 18
|
|
מקווה שתביני מה שכתבתי מקסימום אם לא אני יסביר לך או יעשה את זה בדרך אחרת
קוד:
#include<stdio.h>
#include<math.h>
void main()
{
int a,lol,lol1,lol2,c,d,sum=0,sum2=0;
printf("Type a do sifrati number\n");
scanf("%d",&a);
lol=pow(a,2);
lol1=lol%100;
lol2=lol/100;
while(lol1!=0)
{
c=lol1%10;
sum+=c;
lol1/=10;
}
while(lol2!=0)
{
d=lol2%10;
sum2+=d;
lol2/=10;
}
if((sum/2==c)&&(sum2/2==d))
printf("The pow of the number you choose is a number that his achadot and asarot savot and his meot and alfaim shavot");
else
printf("The pow of the number you choose isnt a number that his achadot and asarot savot and his meot and alfaim shavot");
}
|