Home
About
Contact
Privacy Policy
Terms And Conditions
Disclaimer
ELAB SOLUTIONS
Header Ads Widget
Responsive Advertisement
Home-icon
Ticker
6/recent/ticker-posts
Home
input and output
Adding Digits
Adding Digits
Abishiek
August 27, 2020
Adding Digits Solution:
#include <stdio.h>
int main()
{
int n,d,sum=0;
scanf("%d",&n);
while (n > 0)
{
d=n%10;
sum=sum+d;
n/=10;
}
printf("%d",sum);
return 0;
}
Post a Comment
0 Comments
Followers
Social Plugin
Ad Space
Responsive Advertisement
Popular Posts
Labels
Elab Solution
10
input and output
10
0 Comments