Beruflich Dokumente
Kultur Dokumente
Question2: Create a class ‘BOX’ to find the volume of a box, taking its length, breadth
and height from the user . Finally print the given dimensions and the volume of the box.
Question3:
WAP to find out whether a number is even or odd or prime.
Question4:
Create a grade sheet of a student. The student have a total of 5 subjects . And
maximum marks of all subjects is 100. Use the following chart to make the grade sheet:
Marks(%) Grade
>80 A
>=70 and <80 B
>=60 and <70 C
>=50 and <60 D
<50 E
Question 5:
WAP to calculate the sum of the following series:
S= 1+4+9+16+……….+ n terms
Question 6:
WAP to read a number from the user and print the reverse of this number.
Question 7:
WAP to find out whether a year (entered in 4 digit number) is a leap year .
Question8:
WAP to print Fibonacci series i.e., 0 1 1 2 3 5 8 13 ………..
The number of terms required is to be taken as an input from the user.
Question 9:
WAP to find the lCM(least common multiple) and GCD(Greatest Common Divisor) of
two numbers.
Question 10:
A special number is a number in which the sum of the factorial of each digit is equal to
the number itself. eg., 145= 1! +4!+5!=1+24+120=145
Design a class Special to check if a given number is a special number or not. And take
the number as an input from the user.