Some programs to practice in Java- Part One(1)

Codynn
6 Min Read

 1. Write a program to display volume of sphere. 

2.  Write a program to display area of 4 walls. 

3.  Write a program to display total surface area and volume of cuboid.  

4.  Write a program to display total surface area of cube.  

5.  Write a program to display area of rectangle 

6.  Write a program to display circumference of circle. 

7.  Write a program to display area of triangle when three sides are given. 

8.  Write a program to display area and circumference of circle. 

9.  Write a program to ask distance in kilometer and convert into miles. 

10.  Write a program to ask distance in miles and convert into kilometer. 

11.  Write a program to input distance in meter and convert into kilometer and meter. 

12.  Write a program to calculate potential energy of body. [PE=MGH where G=9.8]  

13.  Write a program to display perimeter of rectangle. 

14.  Write a program to input principal  rate  time and display simple interest and total amount. 

15.  Write a program to ask in kilogram and convert into grams.  

16.  Write a program to ask in gram and convert into kilograms.  

17.  Write a program to display total surface area and volume of sphere. 

18.  Write a program to display total surface area of cylinder. 

19.  Write a program to display total surface area of cuboid / box. 

20.  Write a program to display area and perimeter of rectangle. 

21.  Write a program to display total surface area of sphere. 

22.  Write a program to calculate distance.[S=UT+1/2(AT2)] 

23.  Write a program to input principal  rate  time and display simple interest. 

24.  Write a program to display area of square. 

25.  Write a program to  

26.  Write a program to ask n number and print the sum of first n natural numbers. 

27.  Write a program to ask n number and print the sum square of first n natural numbers. 

28.  Write a program to display total surface area of hemisphere. 

29.  Write a program to display area of circle 

30.  Write a program to display total surface area and volume of cylinder. 

31.  Write a program to ask the user to enter the marks in any four subject and display whether the user is pass or fail. 

32.  Write a program to display volume of cylinder. 

33.  Write a program to display volume of hemisphere.  

34.  Write a program to display total surface area and volume of cube. 

35.  Write a program to display area of triangle. 

36.  Write a program to display volume of cube 

37.  Write a program to display perimeter of square.  

38.  Write a program to display area of parallelogram 

39.  Write a program to display volume of cuboid / box. 

40.  Write a program to ask value in meter and convert into inch.  

41.  Write a program to display total surface area and volume of hemisphere. 

42.  Write a program to display area and perimeter of square.  

43.  Write a program to display cost of painting the four walls of a room.  

44.  Write a program to display simple interest 

45.  Write a program to input number as paise and convert into rupees only. 

46.  Write a program to input selling price and cost price calculate profit or loss percentage. 

47.  Write a program to input the day and display whether the day is Saturday or not?  

48.  Write a program to ask quantity of pen  copy and pencil and their rate and find out the total amount. 

49.  Write a program in  java to convert decimal number to octal number 

50.   Write a program in  java to ask number and find sum of cube of odd digits 

51.  Write a program in  java using Sub procedure to print 1  10  101  1010  10101 

52.  Write a program in  java to find the sum of all natural numbers from 1 to 100 

53.  Write a program in  java to generate the following series 1 121 12321 1234321 123454321 

54.  Write a program in  java to print sum of cube of any two ask numbers 

55.  Write a program in  java to generate the series .1 0.01 0.001 0.0001 0.00001  

56.  Write a program in  java using Sub procedure to print 50 75 100 125 150 

57.  Write a program in  java to ask string and print the ask string in alternate character  

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *