Question: JAVA LANGUAGE Please Solve both Exercises (I'll recommend you) Exercise 1: Write a Java program that prompts the user to enter two integers a and
JAVA LANGUAGE Please Solve both Exercises (I'll recommend you) Exercise 1:
Write a Java program that prompts the user to enter two integers a and b. The program prints 10 integers, starting with a and incrementing b each time.
Sample run 1:
Enter a: 7
Enter b: 4
7 11 15 19 23 27 31 35 39 43
Sample run 2:
Enter a: 22
Enter b: 3
22 25 28 31 34 37 40 43 46 49 ------------------------------------------------------------------------------------------------------------------ Exercise 2:
Write a program that prompts the user to enter the number of tests he/she did in a course. To pass the course, the grade of each test should be greater or equal to 40, and the average of all grades should be greater or equal to 60.
Sample run 1:
Enter the number of tests: 5
Enter the grade of test 1: 80
Enter the grade of test 2: 26
Your grade in test 2 is less than 40. You fail!
Sample run 2:
Enter the number of tests: 4
Enter the grade of test 1: 80
Enter the grade of test 2: 50
Enter the grade of test 3: 48
Enter the grade of test 4: 96
Your average is 68.5. You succeed!
Sample run 3:
Enter the number of tests: 3
Enter the grade of test 1: 50.5
Enter the grade of test 2: 43
Enter the grade of test 3: 43
Your average is 45.5. You fail!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
