Computer Science, asked by alizeha82, 23 hours ago

using switch case statement write a program to input a number ( 1 to 7) and print the day of the week. e.g . input 1 output: Monday. input 3 output: Wednesday ​

Answers

Answered by Jiya0071
1

Answer:

switch(day){

case 1 : printf("Monday\n");

break;

case 2 : printf("Tuesday\n");

break;

case 3 : printf("Wednesday\n");

break;

case 4 : printf("Thursday\n");

break;

case 5 : printf("Friday\n");

break;

case 6 : printf("Saturday\n");

break;

case 7 : printf("Sunday\n");

break;

default: printf("Invalid Input !!!!\n");

}

return 0;

Answered by sofianhendrik
1

Answer:

switch(day){

case 1 : printf("Monday\n");

break;

case 2 : printf("Tuesday\n");

break;

case 3 : printf("Wednesday\n");

break;

case 4 : printf("Thursday\n");

break;

case 5 : printf("Friday\n");

break;

case 6 : printf("Saturday\n");

break;

case 7 : printf("Sunday\n");

break;

default: printf("Invalid Input !!!!\n");

}

return 0;

Explanation:

mark  me as brainliest

Similar questions