Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import static java.lang.System.*;
- import java.util.Scanner;
- import java.lang.Math;
- public class Lesson_14_Activity_Two {
- public static void main (String str []) throws IOException {
- Scanner scanner = new Scanner(System.in);
- int a;
- int b;
- System.out.println("Enter 2 integers.");
- a = scanner.nextInt();
- b = scanner.nextInt();
- if(a >= 0 && b >= 0 ) {
- System.out.println("Both are positive or zero.");
- }
- else {
- System.out.println("One or both are negative.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement