Answer to Question #117976 in C for BIBEK KUMAR

Question #117976
C FOR CHECKING ARMSTRONG NUMBER OR NOT. USING WHILE LOOP.
FILL THE MISSING CODE.

1 #include <stdio.h>
2- void main() {
3 int number, temp, remainder, i, power, digits = 0, sum = 0;
4 printf("Enter a number : ");
5 scanf("%d", &number);
6 temp = number;
7 - while (..... ) { // complete the condition to iterate the Loop
8 digits........ ; // increment the digits
9 temp=........; //calculate the temp value
10
11 temp = number;
12- while (........ ) { // complete the condition to iterate the Loop
13 remainder = number % 10;
14 i = 1;
15 power = 1;
16- while (........ ) // find the powers of each digit
17 power.........; // calculate power value
18 i..............; // increment i value
19 }
20 sum =........... ; // calculate sum value
21 number=........; // calculate number value
22
23- if (............ ) {
24 printf("The given number %d is an armstrong number\n", temp);
25 - else {
26 printf("The given number %d is not an armstrong number\n", temp);
27 }
28 }
1
Expert's answer
2020-05-24T17:13:34-0400
Dear BIBEK KUMAR, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS