import static java.lang.System.out; import java.util.Scanner;
public class AverageGrade {
public static void main(String[] args) { double TestScore1;
double TestScore2; double TestScore3; String name1;
Scanner Keyboard = new Scanner(System.in); System.out.print(“Please enter your name:”);
name1 = Keyboard.nextLine(); System.out.println(“Please enter test score1”); TestScore1 = Keyboard.nextInt(); System.out.println(“Please enter test score2”); TestScore2 = Keyboard.nextInt(); System.out.println(“Please enter test score3”); TestScore3 = Keyboard.nextInt();
double average = ((TestScore1 + TestScore2 + TestScore3)/3); out.println(name1);
out.println(“The avarage score of the three tests is: ” + average); if (average>90)
{
System.out.println(“You got an A”);
}
else if (average>=80)
{
System.out.println(“You got a B”);
}
else if (average>=70)
{
System.out.println(“You got a C”);
}
else if (average>=60)
{
System.out.println(“You got a D”);
}
}
}
Place an Order
Plagiarism Free!
Create an Account
Create an account at Top Tutor Online
- Allows you to track orders.
- Receive personal messages.
- Send messages to a tutor.
Post a Question/ Assignment
Post your specific assignment
- Tutors will be notified of your assignment.
- Review your question and include all the details.
- A payment Link will be sent to you.
Wait for your Answer!
Make payment and wait for your answer
- Make payment in accordance with the number of pages to be written.
- Wait for your Answer as a professional works on your paper.
- You will be notified when your Answer is ready.