Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using C programming: Write a program that prompts the user to enter integer valu

ID: 3532730 • Letter: U

Question

Using C programming: Write a program that prompts the user to enter integer values for three variables a, b, and c. The program also prompts the user to enter an integer value for the variable choice between 1 and 4. The program then computes the values of the following expressions: If the value of choice is equal to 1, the expression: 4b* c-3a If the value of choice is equal to 2, the expression: is a2 + b - 6*a*c If the value of choice is equal to 3, the expression: b* c- 2a3 / b If the value of choice is equal to 4, the expression: b* a- 3 (a+c)

Explanation / Answer

#include <stdio.h>


int main()

{

printf("Enter the values of a b and c ");

int a,b,c,ch;

scanf("%d%d%d",&a,&b,&c);

printf("Enter your choice between 1 and 4 ");

scanf("%d",&ch);

switch(c)

{

case 1:printf("Value = %d",(4*b*c-3*a)); break;

case 2:printf("Value = %d",(a*a + b - 6*a*c)); break;

case 3:printf("Value = %d",(b* c- 2*a*a*a / b)); break;

case 4:printf("Value = %d",(b*a- 3*(a+c))); break;

default: printf("Incorrect Choice ");

}

return 1;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote