+ 1

what is problem with my c code please help

problem https://code.sololearn.com/c8MvO4Nc7H8r/?ref=app

15th Jun 2018, 6:33 PM
Rahul guha
Rahul guha - avatar
2 Réponses
+ 3
this might help you #include <stdio.h> int main() { int number, originalNumber, remainder, result = 0; printf("Enter a three digit integer: "); scanf("%d", &number); originalNumber = number; while (originalNumber != 0) { remainder = originalNumber%10; result += remainder*remainder*remainder; originalNumber /= 10; } if(result == number) printf("%d is an Armstrong number.",number); else printf("%d is not an Armstrong number.",number); return 0; }
15th Jun 2018, 7:30 PM
Arun Tomar
Arun Tomar - avatar
+ 1
thanks bro
16th Jun 2018, 1:38 AM
Rahul guha
Rahul guha - avatar