Untitled
unknown
plain_text
4 years ago
526 B
10
Indexable
/* Lesson 4 Coding Activity Question 2 */
import java.util.Scanner;
public class U3_L4_Activity_Two{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("Enter two integers:");
int numOne = input.nextInt();
int numTwo = input.nextInt();
if ((numOne < 0) || (numTwo < 0)){
System.out.println("One or both are negative.");
}
if ((numOne >= 0) && (numTwo >= 0)){
System.out.println("Both are positive or zero.");
}
}
}
Editor is loading...