1. Write a program to ask the user to enter any number from 1-7, print day of the week based on the input [HINT: If the number is 1 then print Sunday if it is 2 then print Monday… etc] (Use switch-case only)
  2. Write a program to accept a number given by the user and check and print if the number is odd or even
  3. Write a program to accept a number from the user and print whether the number is prime or not. (A prime number is a number that has only two factors 1 and the number itself)
  4. Write a program to print the sum of the following series.
    Sum= 2^2+4^2+6^2+……..+n^2
  5. Solve the following patterns

1 2
1 2 3
1 2 3 4
1 2 3 4 5

& &&&&


Please enter your comment!
Please enter your name here