hi to everybody. I'm just wonderin' if someone can help me with arrays. I am making a program of computing an average grade. I manage to execute the first requirements. The problem i have is how can i compute the grades that had been entered using a seperate method
here is the syntax of my command.
import java.util.Scanner;
public class gradesArray {
/**
* @param args the command line arguments
*/
static Scanner input = new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.print("\nPlease enter the student's full name - ");
String studentName = input.nextLine();
System.out.print("\nHow may grades will you be entering for " + studentName
+ "? - ");
int count = input.nextInt();
short[] grades = new short [count];/// array
System.out.print("\nPlease enter the grades one at a time, pressing enter "
+ "after each value.");
for (int x = 0; x < count; x++)
grades[x] = input.nextShort();
}
}
public static string[]gettingAverage()
{
int temp = n1
to
}
}
thanks