Question: Write a C program using if-else. The program reads a real number x and then depending on the value of x, it will do

Write a C program using if-else. The program reads a real number 

Write a C program using if-else. The program reads a real number x and then depending on the value of x, it will do the following operation. Value of x =10 Required operation Read the side of a square, calculate and display area of square. Read the side of a rectangle, calculate and display area of rectangle.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

int main float x printfEnter a real number scanff x if x 10 float side printf... 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!