include stdio long long int cr res int main void while scanf lld lld r

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
long long a,b;
int cr,res;
int main (void)
{
while(scanf("%lld %lld",&a,&b),a+b>0)
{
res =0;
cr = 0;
while((a > 0) || (b > 0))
{
if (a%10 + b%10 + cr > 9)
{
cr = 1;res++;
}
else cr = 0;
a /= 10; b /= 10;
}
if (!res) printf("No "); else printf("%d ",res);
printf("carry operation");
if (res > 1) printf("s.\n"); else printf(".\n");
}
}