Question: WRITE IN C LANGUAGE 4. (25 points) Answer the following questions. a. (15 pts) The program given below uses a switch-case statement. Re-write the program

 WRITE IN C LANGUAGE 4. (25 points) Answer the following questions.

WRITE IN C LANGUAGE

4. (25 points) Answer the following questions. a. (15 pts) The program given below uses a switch-case statement. Re-write the program converting the switch-case statement into an if-else statement. #include void main({ int num: VON DOO scanf( f("%d",&num); switch(num, case 1: num = num +5; break; case 2: case 4: num=num * 2: break; case-1: num = 0; break; default: num = -1; } printf("The result is %d ",num): } b. (10 points) (WHO) The age health scale of the world health organization is given below. 0 - 17 adolescents.lergen) 18 - 65 teen.(gen) 66 - 79 middle aged.Cortavasl) 80 - 99 old. (yasl The age of a person is entered on the keyboard. Write main routine which does given procedure

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!