Skip to content

Commit 310ae5a

Browse files
committed
feat: Add height check logic for roller coaster eligibility
✅ Logic: - Checks if user's height is at least 1.5 meters - Grants or denies access based on condition. Signed-off-by: Somesh diwan <[email protected]>
1 parent ad60e19 commit 310ae5a

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
public class Practice3
2-
{
3-
public static void main(String[] args)
4-
{
5-
double temperature; //in Celsius degrees
6-
double humidity; //as a percentage
7-
boolean smartMode;
8-
9-
/*
10-
The previous variables have been assigned hidden values here.
11-
*/
1+
public class Practice3 {
2+
public static void main(String[] args) {
3+
double temperature = 25.0; //in Celsius degrees
4+
double humidity = 0.75; //as a percentage (0.75 = 75%)
5+
boolean smartMode = false; //smart mode is off
126

137
if (smartMode) //if smartMode is true, then...
148
{
@@ -25,4 +19,4 @@ else if (temperature > 24) //else, if the humidity is lower, then...
2519
System.out.println("Fan activated.");
2620
}
2721
}
28-
}
22+
}

0 commit comments

Comments
 (0)