Write a menu driven program (using switch-case) which accepts a number as user input: A) Checks whether the number is even or odd B) Checks whether the number is prime
Answer :
Word Count : 135
_____ _____ _______ __________ _______ ___ _________.
_________ ____ ___ _______ ___ ___ __________ _______ __________ __________ ___.
_____ _____ ______ _________ _________ _____ _______ _________ _____ ________ _________.
________ _____ _________ ________ __________ _____.
________ ___ ______ _____ ____ ______ ___ __________.
__________ _________ _____ ___ __________ ____ ___ _______ ________ ________.
_____ ___ _____ ________ ____ _______ ______ ________ _________ _____.
___ _______ ________ __________ ________.
__________ ______ _____ ______ ________ ___ ___ ____ __________ _________ _____.
__________ __________ _______ ___ ___ ________ ______ _____ ____ ________ _________ ______.
___ ____ _________ _________ _______ _______.
#include #include int main() { int choice, num, i, flag; ``` while(1) { printf("\nMenu:\n"); printf("1. Check Even or Odd\n"); printf("2. Check Prime\n"); printf("3. Exit\n"); printf("Enter
____ _____ ____ _____ _________ ____ _____ __________ _______ ___ _______._____ _____ _______ __________ _______ ___ _________.
_________ ____ ___ _______ ___ ___ __________ _______ __________ __________ ___.
_____ _____ ______ _________ _________ _____ _______ _________ _____ ________ _________.
________ _____ _________ ________ __________ _____.
________ ___ ______ _____ ____ ______ ___ __________.
__________ _________ _____ ___ __________ ____ ___ _______ ________ ________.
_____ ___ _____ ________ ____ _______ ______ ________ _________ _____.
___ _______ ________ __________ ________.
__________ ______ _____ ______ ________ ___ ___ ____ __________ _________ _____.
__________ __________ _______ ___ ___ ________ ______ _____ ____ ________ _________ ______.
___ ____ _________ _________ _______ _______.
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.