Skip to content

Commit

Permalink
feat(3.2.4): Finished U3_L2_Activity_Four
Browse files Browse the repository at this point in the history
  • Loading branch information
101zh committed Oct 9, 2023
1 parent b077da8 commit 3a296d1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"configurations": [
{
"type": "java",
"name": "U3_L2_Activity_Four",
"request": "launch",
"mainClass": "Unit3.U3_L2_Activity_Four",
"projectName": "my-app"
},
{
"type": "java",
"name": "U3_L2_Activity_Three",
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/Unit3/U3_L2_Activity_Four.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package Unit3;

import java.util.Scanner;

public class U3_L2_Activity_Four {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

System.out.println("Enter two test values");
double test1 = scanner.nextDouble();
double test2 = scanner.nextDouble();

if (!(test1 <= 100.0 && test1 >= 0.0))
System.out.println("Not Valid");
if (!(test2 <= 100.0 && test1 >= 0.0))
System.out.println("Not Valid");

scanner.close();

}
}

0 comments on commit 3a296d1

Please sign in to comment.