-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathequal_no.java
More file actions
27 lines (26 loc) · 770 Bytes
/
equal_no.java
File metadata and controls
27 lines (26 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.Scanner;
public class equal_no
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("test cases : ");
int t = sc.nextInt();
for(int i = 0;i < t;i++)
{
System.out.println("enter a: ");
int a = sc.nextInt();
System.out.println("enter b: ");
int b = sc.nextInt();
if(1 <= a && a <= 50 && 1 <= b && b <= 50 && a <= b) {
for (int j = 1; j <= 50; j++) {
if ((a * j) == b) {
System.out.println("YES");
}
}
}
else{
System.out.println("NO");
}
}
}
}