Commit 9f0868dc authored by elijah vasquez's avatar elijah vasquez 🦍

ver 5

parent d73fe499
......@@ -36,7 +36,14 @@ public class App {
}
// Exercise 5 - Branching - switch
int month = 3; // Ex 5.1
int month = 8; // Ex 5.1
// Ex 5.2
if (month < 1) {
System.out.println("Not a valid month");
}
else if (month > 12) {
System.out.println("Not a valid month");
}
switch (month) {
case 1:
System.out.println("January");
......@@ -76,6 +83,7 @@ public class App {
break;
}
// Exercise 6 - Looping - for loop
// Exercise 7 - Looping - while(), do{} while()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment