program of Armstrong no.
don't spam******
nanu12379:
hiiiiii
Answers
Answered by
0
hey mate ur answer in attachment
hope it help u
hope it help u
Attachments:
Answered by
0
#include <stdio.h>
int main() {
int arms = 153;
int check, rem, sum = 0;
check = arms;
while(check != 0) {
rem = check % 10;
sum = sum + (rem * rem * rem);
check = check / 10;
}
if(sum == arms)
printf("%d is an armstrong number.", arms);
else
printf("%d is not an armstrong number.", arms);
return 0;
}
Similar questions
Political Science,
6 months ago
English,
6 months ago
History,
6 months ago
Math,
11 months ago
Geography,
11 months ago