-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.java
More file actions
29 lines (26 loc) · 743 Bytes
/
Copy pathInput.java
File metadata and controls
29 lines (26 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* This program computes and displays the volume of a sphere for a given radius.
*
* @author {user}
* Course: COMP B11
* Created: Jan 24, 2017
* Source File: SphereVolume.java
*/
import java.util.Scanner;
public class Input {
public static void main(String[] args) {
double radius;
int integer;
Scanner input = new Scanner(System.in);
System.out.print("Enter radius: ");
radius = input.nextDouble();
System.out.print("Enter an integer: ");
integer = input.nextInt();
// System.out.print("radius: ");
System.out.printf("radius=%10f\nintger=%d\n", radius, integer);
// System.out.println(radius);
// System.out.print("integer: ");
// System.out.println(integer);
input.close();
}
}