0

Program

Write a C program accept three digit number find out sum of digit. Please someone give me solution

14th Mar 2018, 1:45 PM
Pragya Singh
Pragya Singh - avatar
1 Antwort
+ 10
#include <stdio.h> double cube(double num); int main() { int num; double c; scanf("%d", &num); printf("%d",(num%10+(num/=10)%10+(num/=10)%10)); return 0; } //for 3 digit number ... thats what U asked for
14th Mar 2018, 1:57 PM
Gaurav Agrawal
Gaurav Agrawal - avatar