Menu

Get Help Following Requirements C Modify Program Figure 26 Exam1 Exam2 Ask User Enter Two Q43864955

Can i get some help on the following requirements in C.

Modify the program Figure 2.6 (exam1/exam2)Ask the user to enter two numbers (decimal and a base 0 to 9)Write a loop: while (exam1 > 0 ) { // exam1 is the first numberInside the loop:Find the remainder when the first number is divided by the second and print itAssign the first number the result when the first number is divided by the secondIn other words, the program used to do this (Phase 2):22 2Divide = 11 Remainder = 0Now it should do this 22 201101If you run it again:20 842If you run it again:14 20111If you run it again:62 867In other words, you just wrote a converter from base10 decimal to base2 binary, base8 octal, etc..If you read the output backwards:Base10 22 is base2 10110Base10 20 is base8 24Base10 14 is base2 1110Base10 62 is base8 76

This is my code:

int main() {
  
const int bonus = 10;
  
int num1;
int num2;
int division;
int remainder;

printf(“Enter two numbers;n”);
scanf(“%d%d”,&num1, &num2);
  
division = num1 / num2;
remainder = num1 % num2;
  
printf(“division = %d, remainder = %dn”, division, remainder);

return (0);
}

thank you

Expert Answer


Answer to Can i get some help on the following requirements in C. Modify the program Figure 2.6 (exam1/exam2) Ask the user to ente…

OR