Exercise Questions - Switch

  1. WAP to Input number between 1-7 and print corresponding day. For example: 1-Monday, 2-Tuesday … so on.

    Solution: C Java

  2. WAP to Input number between 1-12 and print corresponding month. i.e. 1-January, 2-February, 3-March … so on.

    Solution: C

  3. Currency Converter: WAP to convert Dollar into Rupees and vice versa.

    Solution: C Java

  4. WAP to create Menu based (choice based) program for temperature conversion.

    Solution: C

  5. WAP to use Arithmetic operators (Mini Calculator). using character

    Solution: C

  6. Weight Converter: WAP to convert Gram into Kilogram and vice versa.
  7. Write an interactive program to do the following operations by providing the choice using the switch statement:
    1 - Add two numbers
    2 - Subtract two numbers
    3 - Multiply two numbers
    4 - Divide two numbers
    5 - Exit

    Solution: C