Enter your height in inches: 65 You are 5 feet 5 inches tall. |
Enter your height in inches: 71 You are 5 feet 11 inches tall. |
Enter your height in inches: 72 You are 6 feet 0 inches tall. |
Input: 6578 Output: 8765 |
Input: 1234 Output: 4321 |
Input: 1005 Output: 5001 |
Movie #1 Enter the movie 1 hours: 2 Enter the movie 1 minutes: 40 Movie #2 Enter the movie 2 hours: 1 Enter the movie 2 minutes: 20 The total watching time is 4 hours and 0 minutes |
Movie #1 Enter the movie 1 hours: 1 Enter the movie 1 minutes: 44 Movie #2 Enter the movie 2 hours: 1 Enter the movie 2 minutes: 20 The total watching time is 3 hours and 4 minutes |
Movie #1 Enter the movie 1 hours: 3 Enter the movie 1 minutes: 50 Movie #2 Enter the movie 2 hours: 1 Enter the movie 2 minutes: 50 The total watching time is 5 hours and 40 minutes |
Measurement #1 Enter the degrees: 74 Enter the minutes: 29 Enter the seconds: 13 Measurement #2 Enter the degrees: 105 Enter the minutes: 8 Enter the seconds: 16 The sum of measurement #1 and measurement #2 is 179 degrees, 37 minutes, and 29 seconds |
Measurement #1 Enter the degrees: 7 Enter the minutes: 14 Enter the seconds: 55 Measurement #2 Enter the degrees: 5 Enter the minutes: 24 Enter the seconds: 55 The sum of measurement #1 and measurement #2 is 12 degrees, 39 minutes, and 50 seconds |
Measurement #1 Enter the degrees: 1 Enter the minutes: 17 Enter the seconds: 48 Measurement #2 Enter the degrees: 237 Enter the minutes: 42 Enter the seconds: 12 The sum of measurement #1 and measurement #2 is 239 degrees, 0 minutes, and 0 seconds |
How many handcrafted bikes will be shipped? 26 You will need 2 large containter(s), 1 medium container(s), and 1 small container(s) |
How many handcrafted bikes will be shipped? 4 You will need 0 large containter(s), 0 medium container(s), and 4 small container(s) |
How many handcrafted bikes will be shipped? 42 You will need 4 large containter(s), 0 medium container(s), and 2 small container(s) |
int a = 123; int b = 13; int c = 369; int d = 1230; System.out.printf("%8d\n", a); System.out.printf("%8d\n", b); System.out.println(" ______"); System.out.printf("%8d\n", c); System.out.printf("%8d\n", d);
public static void main(String[] args) { int x; x = (int) Math.pow(2, 31); System.out.println("The largest value that can be stored in x is " + x); x = x + 1; System.out.println("x + 1 = " + x); }