answersLogoWhite

0

import java.io.*;

public class sum{

public static void main(String[] args) {

try{

System.out.print("Enter 10 numbers: ");

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

int[] input=new int[10];

int a,total=0;

for(a=0;a<10;a++) {

System.out.println();

input[a]=Integer.parseInt(br.readLine());

}

for(a=0;a<10;a++) {

total+=input[a];

}

System.out.println("The sum of the numbers is "+total);

}catch(Exception e) {

e.printStackTrace();

}

}

}

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
More answers

10 + 10 = 20

User Avatar

Wiki User

14y ago
User Avatar

64.0000

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: The sum of a number and ten?
Write your answer...
Submit
Still have questions?
magnify glass
imp