public class MultipleBirths
1:
2: import java.util.*;
3:
4: public class MultipleBirths
5: {
6: public static void main(String[] args)
7: {
8: int numberOfBabies;
9: System.out.print("Enter number of babies: ");
10: Scanner keyboard = new Scanner(System.in);
11: numberOfBabies = keyboard.nextInt( );
12: switch (numberOfBabies)
13: {
14: case 1:
15: System.out.println("Congratulations.");
16: break;
17: case 2:
18: System.out.println("Wow. Twins.");
19: break;
20: case 3:
21: System.out.println("Wow. Triplets.");
22: break;
23: case 4:
24: case 5:
25: System.out.println("Unbelieveable.");
26: System.out.println(numberOfBabies + " babies");
27: break;
28: default:
29: System.out.println("I don't believe you.");
30: break;
31: }
32: }
33: }
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46: