Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the JAVA code below to allow a user to enter any number of subjects and the corresponding results to and to compute the average

Modify the JAVA code below to allow a user to enter any number of subjects and the corresponding results to and to compute the average needed to achieve 70& or over average.

import java.util.Scanner;

public class Honors {

public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter the amount of subjects that you need to get an average of: "); int amount_of_subjects; amount_of_subjects = in.nextInt(); System.out.print("Enter the amount of subjects that you got results for: "); int amount_of_subjects_results; amount_of_subjects_results = in.nextInt(); System.out.print("Enter the test result you have got for a subject: "); float res=0; for(int i=0;i

} }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

Students also viewed these Databases questions