0
Write a programme, input a three digit number from user and print sum of given numbers
three digit number be like 123,,456 etc and their sum like 123 (three digit number) so their sum =1+2+3=6
11 Answers
+ 5
yes.....see the number and add the digits yourself
...đđđ..
..
...
just kidding..never mind
0
any simple way to get
i am new one to learn C++
0
bhai I didn't know 'res' and the use of %
0
https://code.sololearn.com/ceUqZZz5STam/?ref=app
ask me anything if you don't understand
0
% is modulus operator , it means remainder.
10%3 = 1 this is because reminder of 10/3 is 1
0
why did we take sum=0?
0
we use sum variable to store the summation of digits, there might be garbage value to sum , to avoid it we initialize it with 0. Hope you get it
0
ok I understand better than 1st one
thanks
0
happy to know :)
0
ya