sandra0309

audi4.vezba4

Jan 17th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include<stdio.h>
  2. int main ()
  3. {
  4.   int
  5.   scanf("%d",&n);
  6.   i=0;
  7.   while(i<3)
  8.   {
  9.   cifra=n%10;
  10.   suma=suma+cifra;
  11.   n/=10;
  12.   i++;
  13.  
  14.   }
  15.   if(n%1000==suma)
  16.   {
  17.   printf("tocno");
  18.  
  19.   }
  20.   else
  21.   {
  22.   printf("netocno");
  23.   }
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment