Back to Tutorials
Practice TestsICSEClass 9Computer Applications

ICSE class ix computer practice test 4

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

Trushna Tejwani31 May 2020
Practice Tests

ICSE class ix computer practice test

Oops concepts

  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
1 2
1 2 3
1 2 3 4
1 2 3 4 5

& &&&&
&&&&
&&&
&&
&

Watch Java videos