1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
igor_vitrenko [27]
3 years ago
12

Write a program that asks the user to type 5 integers

Computers and Technology
1 answer:
AnnZ [28]3 years ago
5 0

import Java.util*

public class Average{
public static void main(String [] args){

int sum = 0;
int numbers = 0;

for(int i = 0; i < 5; i++){
Scanner sc = new Scanner(System.in);
System.out.println(“Please enter your integers: “);
numbers = sc.nextInt();

sum += numbers;
}
System.out.println(“The average is: “ + sum/5)”
}
}
You might be interested in
Function prototypes and function definitions look similar because they have the same function heading. In a function prototype t
hjlf

Answer:

In a function prototype the heading is followed by a semicolon, whereas in a function definition the heading is followed by a function block.

Explanation:

As the function prototype only declares the function and the function definition defines the operations in the function.

e.g:

add(int x, int y);  is the prototype

add(int x, int y)

{

     int sum;

     sum = x+y;

}    is the function definition.

3 0
3 years ago
Which statement best describes network security
Andreyy89
<span>B.network security means all personal information is kept safe the network is not compromised and only authorized users had access 

Im pretty sure they ment has instead of had</span><span />
3 0
3 years ago
Read 2 more answers
What is A wage paid based on the ability to sell a product or service is (a) _____.
Fantom [35]
The answer is commissioned
5 0
4 years ago
What is the function of a CPU? simple words:D
koban [17]

Answer:

The brains of a computer

4 0
3 years ago
Read 2 more answers
HELPPPPPPPP
Reika [66]
The answer is visual hierarchy :)
4 0
3 years ago
Read 2 more answers
Other questions:
  • Read the following paragraph:
    9·2 answers
  • Your essay is due tomorrow and you don't have time to write it. You decide to buy an essay online. You've paid for it, so it can
    12·1 answer
  • 18. Applying what formatting option to your Excel workbook will make it easier to read when printed out?
    9·1 answer
  • Why should you stay out of the open space to the right of a semi tractor trailer?
    7·2 answers
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • Create and test a user-defined function named ufnFullName that combines the values of the two parameters named FirstName and Las
    15·1 answer
  • Upon connecting to a Wi-Fi network, you're redirected to a login screen and a request to accept terms of service before being co
    15·1 answer
  • Every Java statement ends with: *<br><br> Period<br> Colon<br> Double quote<br> Semicolon
    11·2 answers
  • Determine what is printed by the following code.
    8·1 answer
  • Create a list called courses containing the names of your current courses.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!