I have to read from standard input two numbers as strings, in C. How can I print their sum as a string too? I have:
char a[10],b[10];
printf("enter the two numbers");
scanf("%s%s",&a,&b);
char sum[20];
sum=?
A little tip,please? Thank you!
Just do it like in elementary school
Let's say the input was "...69 + ...63"
9 + 3 = 2 and 1 to go
6 + 6 + 1 = 3 and 1 to go
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With