From 21ccf70619006da5a982aa6976c6a9c7d38934ce Mon Sep 17 00:00:00 2001 From: Lirisha Date: Wed, 9 Oct 2019 17:21:22 +0530 Subject: [PATCH] add file --- Untitled-1.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Untitled-1.txt diff --git a/Untitled-1.txt b/Untitled-1.txt new file mode 100644 index 0000000..863f0cc --- /dev/null +++ b/Untitled-1.txt @@ -0,0 +1,15 @@ +#include + int main() +{ +int n,sum=0,m; +printf("Enter a number:"); +scanf("%d",&n); +while(n>0) +{ +m=n%10; +sum=sum+m; +n=n/10; +} +printf("Sum is=%d",sum); +return 0; +} \ No newline at end of file