Check whether the first number is a factor of the second number or not.
a) 3;2917
Answers
Answered by
2
Answer:
No
Step-by-step explanation:
As if we add 2+9+1+7 it comes 19 which is not divided by 3
Answered by
8
import java. util.*;
class Hello
{
public static void main(string args[])
{
Scanner sc=new scanner (System. in);
int a, b, r;
System.out.println ("Enter 2 nos.");
a=sc. nextInt();
b=sc. nextInt();
r=a%b;
if (r==0)
System.out.println (b+"is a factor of"+a);
else
System.out.println (b+"is not a factor of"+a);
}
}
Similar questions
History,
1 month ago
English,
1 month ago
India Languages,
2 months ago
Math,
9 months ago
Math,
9 months ago