answersLogoWhite

0


Best Answer

import java.io.*;

import java.util.*;

class ab

{

public static void main (string ar[]) throcos exception

{

InputstreamReader isr= new InputStreamReader (system.in);

BufferReader br=new BufferReader (isr);

String S=br.readLine();

int sum=0;

StringTokenizer st=new stringTokenizer (s,"");

while (st.hasMoreTokens ());

{

String sl= st.nextToken();

int n= integer.parseInt (Sl);

System.out.println(n);

sum=sum+n;

}

System.out.println(s);

}

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Reads a line of integers and then display each integer and sum of all integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How are integers rational numbers?

Rational numbers are of the form n/m where n and m<>0 are integers. Since for each integer n and integer 1 we know that n = n/1, each integer is a rational number.


How are integers and whole numbers the same?

Each integer is a whole number and each whole number is an integer. So the set of all integers is the same as the set of all whole numbers. By the equivalence of sets, integers and whole numbers are the same.


How integers and whole numbers the same?

Each integer is a whole number and each whole number is an integer. So the set of all integers is the same as the set of all whole numbers. By the equivalence of sets, integers and whole numbers are the same.


What are the two closest integers for each irrational number?

They are the integer part of the irrational number and the successor to that integer. Thus, for pi, the two integers are 3 and 4.


Are integers infinite?

No. Each integer is finite. There is an infinite number of them though.


When two or more integers are multiplied is each integer a factor of the product?

That is correct.


What do integers and absolute value have to do with each other?

The absolute value of an integer is the value of the integer without regard to its sign. The absolute value need not be an integer.


What are the characteristics of LCM?

The LCM of a set of integers is the smallest positive integer which each of them will divide evenly.An alternative characteristic is that it is the smallest positive integer which is in the times-table of each of the numbers.


What is an integer that's a real number?

All integers are real numbers.


What is least positive integer that is divisible by each of the integers 1 through 7 inclusive?

what is least positive integer that is divisible by each of the integers 1 through 7 inclusive ? a 420 b 840 c 1260 d 2520 e 5o40


How many names are there total?

Infinitely many. Each integer has a different name and there are infinitely many integers.


What are the character traits of LCM?

Given a set of integers, the LCM is the smallest integer which is a multiple of each of element of the set.