Answered step by step
Verified Expert Solution
Question
1 Approved Answer
revise this code in C so that it works as the instruction 3 4 5 6 7 /* This program should perform the duties of
revise this code in C so that it works as the instruction
3 4 5 6 7 /* This program should perform the duties of a calculator The program should ask for the input until 'q' is entered. For each operation, print the result and then print whether the result is >100 or int main(void) { char input; int numi, num2, result, count = 1; while(input != q) { { printf("Welcome to the Calculator Operation choices: \tAddition(A) \t\t\tSubtraction(S) \t\t\tMultiplication(M) \t\t\tDivision (D) Enter choice: "); scanf("%c", input); 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 if(input = A && input == 'S' && input == 'M' || input == 'D'){ printf("Enter both numbers in required sequence: "); scanf("%d %d", numi &num2); switch(input) { case 'A': result += num1 num2; break; case 'R': result = num || num2; default: result == num2 % num1; case 'M': result *= num1 ** num2; } print("Result is ", result) if(resultStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started