Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

=+4 How does IHRM strategy vary with an MNEs business strategy?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago