- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise02.java
More file actions
Latest commit
12 lines (11 loc) · 526 Bytes
/
Copy pathExercise02.java
File metadata and controls
12 lines (11 loc) · 526 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
publicclassExercise02 {
publicstaticvoidmain(Stringarg[]) {
// Write a program that asks the user to enter three numbers, then
// prints their sum in a nicely-formatted sentence. So if the
// user enters 5.0 2.5 and 10.1, it would print something like:
// "The sum of 5.0, 2.5, and 10.1 is 17.6."
System.out.print("Enter the first number: ");
doublex = StdIn.readDouble(); // get first number
// Add the rest of the code here, then click "run" to test it.
}
}