this the problem.

Write a program that will ask a user to input his/her name and the number of quizes he/she would like to enter. The program will then ask for the scores for quizes and will display the total and average score of quizes. Use array in storing the quiz scores.

sample out put:

Enter name: ____________________
Entrer number of Quizes: 5
quiz1: 10
quiz2: 10
quiz3: 10
quiz4: 10
quiz5: 10
Total Score: 50
Average: 5.0

hiddepolen commented: Homework -1

## All 10 Replies

So what do you have? According to the terms and conditions of this site (which you agreed to when you signed up here), and on general principla, we will not do your homework for you. We are more than glad to help you correct your work, but you do need to do it.

this the problem.

Write a program that will ask a user to input his/her name and the number of quizes he/she would like to enter. The program will then ask for the scores for quizes and will display the total and average score of quizes. Use array in storing the quiz scores.

sample out put:

Enter name: ____________________
Entrer number of Quizes: 5
quiz1: 10
quiz2: 10
quiz3: 10
quiz4: 10
quiz5: 10
Total Score: 50
Average: 5.0

According to the output you wanted, I made something very simple, I don't know if that's what you wanted...

``````import java.util.Scanner;

public class quiz
{
public static void main(String []arg)
{
Scanner input = new Scanner(System.in);
int x, y, z;

String name = input.next();
System.out.print("How many quizes do you want: ");
String quiz = input.next();

System.out.print("\nQuiz-1: ");
int quiz1 = input.nextInt();
System.out.print("Quiz-2: ");
int quiz2 = input.nextInt();
System.out.print("Quiz-3: ");
int quiz3 = input.nextInt();
System.out.print("Quiz-4: ");
int quiz4 = input.nextInt();
System.out.print("Quiz-5: ");
int quiz5 = input.nextInt();

int total = quiz1 + quiz2 + quiz3 + quiz4 + quiz5;

System.out.println("Total Score: " +total);
System.out.println("Average: " +(double)(total/10));

}
}``````
commented: Doing people's homework, and not even right! -1

According to the output you wanted, I made something very simple, I don't know if that's what you wanted...

``````import java.util.Scanner;

public class quiz
{
public static void main(String []arg)
{
Scanner input = new Scanner(System.in);
int x, y, z;

String name = input.next();
System.out.print("How many quizes do you want: ");
String quiz = input.next();

System.out.print("\nQuiz-1: ");
int quiz1 = input.nextInt();
System.out.print("Quiz-2: ");
int quiz2 = input.nextInt();
System.out.print("Quiz-3: ");
int quiz3 = input.nextInt();
System.out.print("Quiz-4: ");
int quiz4 = input.nextInt();
System.out.print("Quiz-5: ");
int quiz5 = input.nextInt();

int total = quiz1 + quiz2 + quiz3 + quiz4 + quiz5;

System.out.println("Total Score: " +total);
System.out.println("Average: " +(double)(total/10));

}
}``````

Totally wrong, not to mention that we don't give away free homework.

I hope the OP comes to work with you whether or not it ever passes the course so you can continue to do its work. Not that either of you would have job long, in that case.

please can you help me ? I need to declare an array to input 10 quiz scores compute and print the average and the lowest quiz score ..

please can you help me ? I need to declare an array to input 10 quiz scores compute and print the average and the lowest quiz score ..

Start a new thread. What have you done so far? Declaring an array is simple. Just go through your notes.
Then you need to loop the array in order to do the calculations that you need. I am sure that your teacher has given sone clues on how to solve this

write a program that will input an array up to 10 then give the average

jessa: a few points here:
1. if you have a question -> start a new thread
2. don't just pass your assignment on to us, show us what you have so far, as it is in no way our goal to do your homework for you, we'll just help you improve/debug it.
3. be specific when asking questions:
"that will input an array up to 10"
up to 10 what? doubles? license plates? goldfish?