Top Posters
Since Sunday
c
5
j
5
a
5
L
5
f
5
j
5
D
4
k
4
y
4
t
4
h
4
l
4
New Topic  
jus10n jus10n
wrote...
Posts: 466
Rep: 0 0
4 years ago
If you enter 1 2 3, when you run this program, what will be the output?

import java.util.Scanner;

public class Test1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter three numbers: ");
double number1 = input.nextDouble();
double number2 = input.nextDouble();
double number3 = input.nextDouble();
// Compute average
double average = (number1 + number2 + number3) / 3;
// Display result
System.out.println(average);
}
}


▸ 1.0

▸ 2.0

▸ 3.0

▸ 4.0
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 35 times
1 Reply
Replies
Answer verified by a subject expert
ccnastopoulosccnastopoulos
wrote...
Posts: 359
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

jus10n Author
wrote...

4 years ago
Good timing, thanks!
wrote...

Yesterday
This helped my grade so much Perfect
wrote...

2 hours ago
Thanks for your help!!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  981 People Browsing
Related Images
  
 4446
  
 14
  
 313
Your Opinion
Which 'study break' activity do you find most distracting?
Votes: 820