KaiquanMah commited on
Commit
40efd14
·
verified ·
1 Parent(s): e9df8ff

int age = Integer.valueOf(reader.nextLine());

Browse files
Week 1: Types, condition clauses and loops/10b. Print ticket price CHANGED
@@ -53,4 +53,37 @@ public class Test{
53
  System.out.println("The ticket is free");
54
  }
55
  }
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  System.out.println("The ticket is free");
54
  }
55
  }
56
+ }
57
+
58
+
59
+
60
+
61
+
62
+ '''
63
+ Testing with input 7
64
+ Give an age: 7
65
+ Ticket price is 2 euros
66
+
67
+ Testing with input 14
68
+ Give an age: 14
69
+ Ticket price is 5 euros
70
+
71
+ Testing with input 19
72
+ Give an age: 19
73
+ Ticket price is 5 euros
74
+
75
+ Testing with input 84
76
+ Give an age: 84
77
+ The ticket is free
78
+
79
+ Testing with input 69
80
+ Give an age: 69
81
+ The ticket is free
82
+
83
+ Testing with input -4
84
+ Give an age: -4
85
+ The input is unviable
86
+
87
+
88
+
89
+ '''