Answered step by step
Verified Expert Solution
Question
1 Approved Answer
aill ahd all ot anbWed to change) 2. Suppose that the input is 38 45 71 4 -1. What is the output of the following
aill ahd all ot anbWed to change) 2. Suppose that the input is 38 45 71 4 -1. What is the output of the following code? Point 3 public static void main(Stringll args) int num,sum = 0; Scanner keyboard = new Scanner(System.in); System.out.print("Enter a number:"); num= keyboard.nextInt(); // Here one input: num-38 while ( num!=-1) System.out.print("Enter a number:"); num = keyboard.nextIn(); // Here four input : 45 , 71.4,-1 sum = sum + num ; //output: sum= System.out.printIn( '' sum=''+ sum + " ")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started