meaganicole
2011-12-02 16:45:26 UTC
My java program won't compile at all and I've tried everything to figure it out but still doesn't work:
import java.util.Scanner;
/* Design and build a program to enable a user to input an array of six integers, which represent the scores allocated by judges in an ice skating competition. Once all scores have been entered into the array, use it to calculate and output the average score. */
class iceSkaters
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int[] scores = new int[6];
int count;
int overall = 0;
for (count = 0; count < 6; count++)
{
system.out.print("Please input the scores that have been allocated by the judges " + (count(+)1) ": ");
scores[count] = input.nextInt();
}
for (count = 0; count < 6; count--)
{
overall = overall + scores[count];
}
System.out.print("average = " + (overall/6.0));
}
}
The errors that it is giving me:
iceSkaters.java:16: illegal start of expression
system.out.print("Please input the scores that have been
allocated by the judges " + (count(+)1) ": ");
^
iceSkaters.java:16: ')' expected
system.out.print("Please input the scores that have been
allocated by the judges " + (count(+)1) ": ");
^
iceSkaters.java:16: ';' expected
system.out.print("Please input the scores that have been
allocated by the judges " + (count(+)1) ": ");
^
iceSkaters.java:16: not a statement
system.out.print("Please input the scores that have been
allocated by the judges " + (count(+)1) ": ");
^
iceSkaters.java:16: ';' expected
system.out.print("Please input the scores that have been
allocated by the judges " + (count(+)1) ": ");
^
5 errors
what can i do to resolve the issue?
thanks