Skip to content

DennerDev/Lista_exercicios01_Java

Repository files navigation

List of Basic Java exercises

.


1.º Write a JAVA program to show the following figure on the screen

2.º Make a JAVA program that draws a "pine tree" on the screen, similar to the one below

3.º Write a JAVA program that asks the user to enter the salary and the total spent in the month. The program should display on the screen

“Budget expenses” >>> if the amount spent does not exceed the salary amount.
“Budget overrun” >>> if the amount spent exceeds the salary amount.

4.º Write a JAVA program that reads two integers. Inform if the numbers are the same or, if not, display them in ascending order

5.º Write a JAVA program that reads an employee's current salary. Inform the value of your ADJUSTED salary, according to the percentages indicated below:

50% for those who receive up to R$ 2,000.00.
20% for those who earn more than BRL 2,000.00 and less than BRL 5,000.00.
10% for others.

6.º A person's body mass index (BMI) is given by their weight (in kilograms) divided by the square of its height (in meters). Write a JAVA program that reads a person's weight and height. Please inform your situation, according to the following criteria:

BMI ≤ 18.5 ⇒ thin
BMI > 18.5 and BMI ≤ 25.0 ⇒ normal
BMI > 25.0 and BMI ≤ 30.0 ⇒ overweight
BMI > 30.0 ⇒ obese

7.º Knowing that UNICID will participate in a soccer championship with a visiting university, make a JAVA program thatw

Read the score of a football game (the goals of each team: Unicid X visiting university)
Enter the UNICID result: Win, Loss or Draw

8.º Make a JAVA program that reads three (3) notes from a student. Calculate the mean and display the mean on the screen

If the average is >= 7.0, the system should display the message PASSED
Otherwise, the program should ask for the recovery note.
o If the recovery grade is >= 5.0, we will inform you that the student has PASSED IN RECOVERY
o Otherwise, we will inform you that the student has FAILED

9.º Write a JAVA program that reads the scores obtained in a test and the program should classify according to the following pattern

0 to 30 ⇒ REGULAR
31 to 60 ⇒ GOOD
61 to 90 ⇒ VERY GOOD
91 to 100 ⇒ GREAT

10.º Write a JAVA program that reads a person's gender (M or F) and height (in meters). Enter your ideal weight using the following formulas

for men: 72.7 * height - 58
for women: 62.1 * height - 44.7

About

List of Basic Java exercises.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages