Question: Classwork_1: Write a C program to input number from user and check whether the number is even or odd using switch case. How to check

 Classwork_1: Write a C program to input number from user andcheck whether the number is even or odd using switch case. Howto check even or odd using switch case in C programming. Logic

Classwork_1: Write a C program to input number from user and check whether the number is even or odd using switch case. How to check even or odd using switch case in C programming. Logic to check whether a number is even or odd using switch case in C program. Example: Input Input number: 12 Output Even number Write the c program below and run it in DEV C: Output: #include int main() { int num; printf("Enter a positive integer number: "); scanf("%d", &num); switch (num %2) { case : printf("%d is an even number. ", num); break; case 1: printf("%d is an odd number. ", num); break; } return 0; } Classwork_2 simple calculator: Write a C program to display a menu and ask the user to choose one option from the menu. This program should ask the user to input two numbers and depending on his choice either add, subtract, multiply or divide these two number. Example: Input Please input your first number: Please input your second number: Menu Please choose one of the following options 1- To add the numbers 2- To multiply the numbers 3- To subtract the first-second 4- To divide the first / second Your choice is: Output You have chosen to ---, therefore the result is: Write the c program below and run it in DEV C: Output: Classwork_3 Number of days is a month: Write a C program to input month number and print total number of days in month using switch...case. C program to find total number of days in a month using switch...case. Logic to print number of days in a month using switch...case in C programming. Example: Input Input your month: 1 Output The number of days in this month is: 31 days Write the c program below and run it in DEV C: Output

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!