Java Basics
[Link] Program to Print “Hello World!”
Input:
output:
2. Java Program to Print my information in proper format
input:
Output:
3. Java program to calculate Call Cost.
Input:
output:
4. Java program for addition, subtraction, division, multiplication and for remainder.
Input:
output:
5. Java program to calculate area of circle
Input:
output:
6. Java program to calculate simple interest
Input:
ouput:
7. Java program to demonstrate block.
Input:
output:
8. Java program to calculate grade.
Input:
output:
9. Java program to chech number is even or odd.
Input:
Output:
10. Java program for calculator using switch case.
Input:
11. Java Program to check nature of roots.
Input:
output:
12. Java program to print your name 50 times using for loop, while loop
and do while loop.
Input:
13. Java program to print natural number using for loop, while loop and
do while loop.
Input:
Output:
14. Java program to print even number using for loop, while loop and do
while loop between 1 to 100.
Input:
Output:
15. Java program to print odd number using for loop, while loop and do
while loop between 1 to 100
Input:
Output:
16. Java program to print prime number using for loop, while loop and do
while loop.
Input:
output:
17. Java program to calculate factorial of given number.
Input:
Output:
18. Java program to print Table of given number
Input:
output:
19. Java program to print: During a sale at a store, a 10% discount is
applied to purchases over Rs. 5000. Write a program that assigns any
value to variable 'purchase' and then calculates the discounted price.
Display purchase amount and discount offered.
Input:
output:
20. Write a java program that determines the price of a movie ticket based
on customer's age and the time of the show (normal or matinee). The
normal show and matinee show ticket price for adult is Rs. 100 and Rs.
50 respectively. Adults are those over 13 years. The children's ticket price
is Rs. 60 and Rs. 40 for normal show and matinee show respectively.
Declare variables of suitable data types for age and show time, assign the
values to these variables and print age, show time and the ticket price.
Input:
output:
21. Write java program: A bank gives loan to customers at a simple
interest of 12% per annum. Interest for the whole term is charged at the
beginning. Compute the monthly installments considering the term of 36
months for loan amount of Rs. 10000, 20000, 30000, 40000, 50000,
60000, 70000, 80000, 90000 and 100000.
Input:
output:
22. Write a java program that prints square root of integer numbers
starting from 5 till the square root is at 50 or less.
Input: