Computer Science, asked by kritika2727, 1 year ago

Please write a program in java to find the sum of numbers which are divisible by 3 . using buffered reader .please it's urgent


kritika2727: Please answer

Answers

Answered by bhavya1234
0

{

        InputStreamReader stream = new InputStreamReader (System.in);

        BufferedReader scan = new BufferedReader(stream);

 

        inputParser = Integer.parseInt(input);

 

        int i = 0;

        while(inputParser != 0)

        {

                input = scan.readLine();

                inputParser = Integer.parseInt(input);

                if(inputParser == 0)

                {

                    inputParser = 0;

                }

                else

                {

                    numbers1[i] = inputParser;

                    i++;

                }

        }

{        InputStreamReader stream = new InputStreamReader (System.in);        BufferedReader scan = new BufferedReader(stream);         inputParser = Integer.parseInt(input);         int i = 0;        while(inputParser != 0)        {                input = scan.readLine();                inputParser = Integer.parseInt(input);                if(inputParser == 0)                {                    inputParser = 0;                }                else                {                    numbers1[i] = inputParser;                    i++;                }        }  
Similar questions