C PROGRAM TO FIND SUM OF DIGITS OF A NUMBER Get link Facebook X Pinterest Email Other Apps January 02, 2023 #include<stdio.h> 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; } Get link Facebook X Pinterest Email Other Apps Comments
PPS UNIT-1 COMPLETE NOTES December 03, 2022 UNIT 1 : INTRODUCTION TO COMPUTERS AND C LANGUAGE NOTES https://drive.google.com/file/d/1PHIklpBvB6nj5fK9zDL7mp0tXIY-o-pp/view?usp=share_link Read more
Comments
Post a Comment