You are on page 1of 3

Note: take your own suppositions where ever necessary.

…..Q1: write a program to that displays a box and a diamond of asterisks(*).(Use the
nested loop)
*************
* *
* *
* *
* *
*************
…..Q2. write a program that calculates the squares and cubes of numbers from 1 to 10
(Use do while loop)
Number square cube
0 0 0
1 1 1
2 4 8
. . .
. . .
10 100 1000
…..Q3. write a program to find whether a number is even or odd.
…..Q4. write a program to generate the Fibonacci Series.
…..Q5. write a program to find the factorial of 1 to 10.
…..Q6. write a program to solve the quadratic equation.
…..Q7. write a program to pass the command line arguments and display those
arguments as an output.
…..Q8. write a program which finds that whether a character is vowel or not (vowel
eg:a,e,i,o,u)
…..Q9. write a program to display ASCII table from 0 to 225.
…..Q10. develop the five function calculator (eg: +,-,*,/,%) use switch statement.
…..Q11. write a program that prints the following table of values.
Number 10*Number 100*Number 1000*Number
0 0 0 0
1 10 100 1000
2 20 200 2000
3 30 300 3000
. . . .
. . . .
5 50 500 5000
…..Q12. write a program to display sum and product of first of ten integers numbers.
1
2
3
.
.
.
10
Sum:??
Product:??
…..Q13. write a program to print sum of first ten even and first odd numbers.

Even Numbers Odd Numbers


0 1
2 3
4 5
. .
. .
. .
20 19
?? ??
…..Q14: write a program to display multiplication table of 10.
1 * 10 = 10
2 * 10 = 20
. . . . .
. . . . .
10 * 10 = 100
…..Q15. write a program to print sum of numbers, squares and cubes of first five
numbers.
Number square cube
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
……Q16. write a program to convert seconds in hours, minutes, and seconds (eg:
seconds=3700)
Hour Minutes Seconds
1 1 40
Q17. write a program to convert given amount into coins.(eg: amount=3736)
1000 500 100 50 20 10 5 1
3 1 2 0 1 1 1 1
…..Q18. write a program to display following series:
1 2 3 ………. 10
1 3 5 ………. 19
2 4 6 ………. 20
1 4 9 ………. 100
4 16 36 ………. 100
…..Q19. write a program to find the value of Z, if x=2,y=3
a) z=(x2+y2)/(x+xy+y)
b) z= 3x2+2x+5
c) z=(x3-xy+5)(y2+2y2+x+3)
…..Q20.write a program to determine whether the character is a capital letter, a small
letter, a digit or a special symbol.(initialize the char variable with any value)
Q21. write a program to produce following output.(use the nested loops)
*
* *
***
****
*****

…..Q22.Multiply two matrices of 3*3 (Rows,Columns) use two dimensional arrays.


…..23.Initialize the array with five subject marks and obtain the average, then display the
grade according the average.(eg:below 40: fail)
…..24. implement the above program(23) without array:
…..25. write a program which initialize the array with the help of loop then display the
output.
…..26.write a program which uses array of 10 elements and find the greatest element
from the array.
…...27.implement the five functions calculator with the help of functions.(use separate
class for functions)
…..28.write a program to use three different functions (every function should return
different value).
…..29.write a program to use three different functions (every function should take
different parameters).
…..30.write three different classes with several functions, save and compile them
separatel. After that write another class which contains main() method then create the
objects of all three classes and call the all functions of those classes.
The End

You might also like