Answer to Question #194766 in Java | JSP | JSF for Zunair

Question #194766

Suppose that the input is:

58 23 46 75 98 150 12 176 145 -999

What is the output of the following program?

import java.util.*;

public class FindTheOutput

{

static Scanner console = new Scanner(System.in);

public static void main(String[] args)

{

int num;

num = console.nextInt();

while (num != -999)

{

System.out.print(num % 25 + " ");

num = console.nextInt();

}

System.out.println();

}

}



1
Expert's answer
2021-05-18T19:57:22-0400

8 23 21 0 23 0 12 1 20 


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS