Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi everyone I\'m almost finish with this assignment and i need help with this qu

ID: 3586690 • Letter: H

Question

Hi everyone

I'm almost finish with this assignment and i need help with this question . I'll appreciate your help. Thanx U.Please respond in C language (not c++)

Write a switch statement that tests the value of the variable AptNum and performs the following actions: if AptNum is 101, the message "First Floor" is printed if AptNum is 202, the message "Second Floor" is printed. if AptNum is 303, the message "Third Floor" is printed for any other value of AptNum, the message "Lucky You, it's the Penthousel" is printed.

Explanation / Answer

Answer:

switch(AptNum) {

case 101: printf("First Floor "); break;

case 102: printf("Second Floor "); break;

case 103: printf("Third Floor "); break;

default: printf("Lucky You, It's the Penthouse! ");

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote