Question: Write a C program using if-else. The program reads one integer number a. Then it reads one integer number b. According to a, the

Write a C program using if-else. The program reads one integer number a. Then it reads one integer number b.

Write a C program using if-else. The program reads one integer number a. Then it reads one integer number b. According to a, the program will calculate the value of y and prints the result according to the following table: Value of a Required Calculation 7 or 9 Any other number 5 y=. b Invalid entered number Note: Write your answer by hand on a paper. Scan then upload. [5 marks]

Step by Step Solution

3.29 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is the C program using ifelse statements to perform the required calculation base... View full answer

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 Programming Questions!