Professional Documents
Culture Documents
2. Create a java program that will reverses the character based on the user
input.
Expected Output:
Enter string 1: U
Enter string 2: O
Enter string 3: Y
Enter string 4: E
Enter string 5: V
Enter string 6: O
Enter string 7: L
Enter string 8: I
===========================
The reverse word is: ILOVEYOU
===========================
3. Create a java program to compute the gross pay of a worker name James
Weird that James Weird worked for 60 hours at the rate of 122.20 per
hour. The program will display the name of employee and the computed
gross pay of the employee.
4. Create a Java program that will display the following output on the
screen.
5. Create a java program that will display the following output on the
screen
If else statement
6. Create a Java program using if statement that will mimics a login form
where user enter username and password.
7. Create a program to allow the user to input students name and course,
the program will read three types of scores (QUIZ, MIDTERM and FINAL
SCORE) and determines the grade based on the following rules. (Using
statement)
Sample Output:
Enter Name: Juan Dela Cruz
Enter Course: BSIT
=================================
Enter Prelim: 90
Enter Midterm: 87
Enter Final: 85
=================================
Juan Dela Cruz your final grade is 87.33
Your grade equivalent is 2.0
8. Write a Java program to calculate the revenue from a sale based on the
unit price and quantity of a product input by the user.
Formula:
Revenue = unitprice* quantity
Discount_amount = revenue*discountrate/100
Select/switch statement
9. Create a Java program that will allow the user to input fruit types and
their classification based on the given table below.
10. Create a Java program that will allow the user to input age of an
individual then determines its classification based on the following table.
Age Classification
0 Newborn
1 Infant
2-3 Toddler
4-5 Pre - School
6-12 School age
13 – 19 Teenager
For loop and Do While Loop
11. Create a program using for loop to display the following output.
+
+++
+++++
++++++++
++++++++++
++++++++
+++++
+++
+
12. Create a program using while loop to display the following output.
13. Create a program using for loop to get the sum and average of the
inputted value.
Sample output:
Enter first number: 0
Enter second number: 10
The sum of inputted number from 0 -10 is: 55
The average is: 5.5