Question: Write C program Create a program that declares the following three integer variables: - opCode is an integer variable. - number_1 is an integer variable

Write C program Create a program that declares the following three integer variables: - opCode is an integer variable. - number_1 is an integer variable initialized to equal the LAST FOUR DIGITS of your STUDENT ID. - number_2 is an integer variable initialized to equal 19.

Write C program Create a program that declares the following three integer

Variables. a program eger opCode is an integer variable. - number_1 is an integer variable initialized to equal the LAST FOUR DIGITS of your STUDENT ID. number_2 is an integer variable initialized to equal 19. Next prompt the user to enter a value for opCode (1, 2, 3, 4, or 5): Next, read the value entered from the keyboard and assign it to opCode: - Enter an integer value for opCode (1, 2, 3, 4, or 5): (Enter 1 from the keyboard for the first run) (Enter 2 from the keyboard for the second run) (Enter 3 from the keyboard for the third run) (Enter 4 from the keyboard for the fourth run) (Enter 5 from the keyboard for the fourth run) (Enter 9 from the keyboard for the fourth run) Next create a switch case statement that will display the following output: a. For opCode = 1, your code should display: The SUM of number_1 and number_2 = XXXXXXX b. For opCode = 2, your code should display: The DIFFERENCE of number_1 and number_2 = XXXXXXX c. For opCode = 3, your code should display: The PRODUCT of number_1 and number_2 = XXXXXXX d. For opCode = 4, your code should display: The QUOTIENT of number_1 and number_2 = XXXXXXX e. For opCode = 5, your code should display: The MODULUS of number_1 and number_2 = XXXXXXX f. For opCode = 9, your code should display: You have entered an INVALID value for opCode (USING FIELD WIDTH OF 7) (USING FIELD WIDTH OF 7) (USING FIELD WIDTH OF 7) (USING FIELD WIDTH OF 7) (USING FIELD WIDTH OF 7) The Name, Student ID and Section number that appears in the output of| the program should be your own, not the ones used in the sample run. Sample run 1: ************************************************************ Name: Smith, Peter Student ID: 300999999 Section: 001 ******** ***************************** 1 Enter an integer value for opCode (1, 2, 3, 4, or 5): The SUM of number_1 and number_2 = XXXXXXX Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!