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

public class Assignment3
	public static void main(String [] args)


Scanner scan = new Scanner(;
String first,last ;
int id;

//First and last names and ID input
System.out.println("Welcome to the Grade Calculator");
System.out.print("Please enter your first name:\t");
first = scan.nextLine();
System.out.print("Please enter your last name:\t");
last= scan.nextLine();
System.out.print("Please enter your ID number:\t");
id= scan.nextInt();

//Grade input
 System.out.println("Please enter a your scores as integers one by one.\nEnter a negative number to stop:\n ");

int grade=0; sum=0; count=0;

while(grade>=0 && grade<=100)

		grade = scan.nextInt();
		{count++; sum+=grade;}
		if (grade>=current)

		if (grade <= current)
			(grade = low);


that is all i have for my assignment. I'm pm the Grade input part.
I can't seem to do the high, low and current scores part.

I need to
a. You may wish to have variables for the current, high, and low scores, each of which are
updated (or at least checked) with each grade entered
b. You should have another variable which works as a counter and is incremented every
time a grade is received
c. You should read your first value before the loop begins and subsequent values at the
end of the loop body
e. Use if-statements to check if each entry is higher than the current high or lower than the
current low—if they are, remember the new high/low
f. You may wish to make sure the input is not larger than 100—if it is, it could simply be
changed to 100 and used as such

Edited 6 Years Ago by Lxyslckr: new code

I can't seem to do the high, low and current scores part.

YOu need to work on the steps necessary to solve your problem before trying to write the program.
How would you find the highest number if someone handed you pieces of paper with numbers on them one at a time? What would you compare? What would you do when the new piece of paper had a larger number than the current one?

This article has been dead for over six months. Start a new discussion instead.