Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use 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

Please use C language.

image text in transcribed

image text in transcribed

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; scanf("%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; 3 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.(ergen) 18 - 65 teen (gen) 66 - 79 middle aged (ortayal) 80 - 99 old. (yal) 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago