424 - Integer Inquiry

package uvaTry;

import java.math.BigInteger;
import java.util.Scanner;

public class Main1 {

    public static void main(String[] args) {
   
        BigInteger b=new BigInteger("0");
        BigInteger c=new BigInteger("0");
       
        Scanner inp=new Scanner(System.in);
        while(true)
        {
            BigInteger a=inp.nextBigInteger();
            if(a.compareTo(c)==0)
                break;
           
            b=a.add(b);
           
           
        }
        System.out.println(b);
       
    }

}
SHARE

Amit Ghosh

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment