Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help taking this average grade and having it print out the letter grade equivalent based on the average percent Then it should determine the

Need help taking this average grade and having it print out the letter grade equivalent based on the average percent

Then it should determine the letter grade for that average. I found the average but need help writing code to make that numerical value into a letter grade

The letter grade is based on the following grade range:

A: 90-100%B: 80-89%C: 70-79%D: 60-69% F: otherwise

import java.util.Scanner; import java.math.RoundingMode; import java.text.DecimalFormat;

public class a1 {

public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("enter first grade: "); double g1 = in.nextInt(); System.out.print("enter second grade: "); double g2 = in.nextInt(); System.out.print("enter third grade: "); double g3 = in.nextInt(); System.out.print("enter fourth grade: "); double g4 = in.nextInt(); System.out.print("enter fifth grade: "); double g5 = in.nextInt(); System.out.printf("your average grade is: %.2f",(g1+ g2+ g3+ g4+ g5)/5);

} }

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago

Question

Has the team been empowered to prioritize the issues?

Answered: 1 week ago