Exercise Questions - Switch

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

  3. Input number between 1-12 and print corresponding month. i.e. 1-January, 2-February, 3-March … so on.
  4. Currency Converter: WAP to convert Dollar into Rupees and vice versa.
  5. Solution: C Java

  6. WAP to create Menu based (choice based) program for temperature conversion.
  7. Solution: C

  8. WAP to use Arithmetic operators (Mini Calculator).
  9. Solution: C

  10. 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