Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Write below Java application which prompts the user to enter 15 integers, then computes the sum, and then prints the sum to the screen

Write below Java application which prompts the user to enter 15 integers, then computes the sum, and then prints the sum to the screen

Computer Science

Write below Java application which prompts the user to enter 15 integers, then computes the sum, and then prints the sum to the screen.
import java.util.Scanner;
public class SumInts
{
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
int sum=0;
System.out.print("Enter 15 integers: ");
for (int i=1; i<=15; i++) sum += scan.nextInt();
System.out.println("The sum is " + sum);

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions