mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 22:15:15 +00:00
18 lines
502 B
Java
18 lines
502 B
Java
/* Lesson 5 Coding Activity Question 2 */
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class U3_L5_Activity_Two {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter two numbers:");
|
|
double a = scan.nextDouble();
|
|
int b = scan.nextInt();
|
|
if (a % b != 0) {
|
|
System.out.println(b + " is not a factor of " + a);
|
|
} else {
|
|
System.out.println(b + " is a factor of " + a);
|
|
}
|
|
}
|
|
}
|