New Technology is Common, New thinking is rare
Download Now
#include <stdio.h> int main() { int no, sum; printf("Please enter a number: "); scanf("%d",&no); for(s=0;no>0;no=no/10) { sum = sum + no%10; } printf("Sum of digits is: %d", sum); return 0; }
Bhuvan Arora
Post a Comment
No comments:
Post a Comment