write a program to input two integers and check whether they are multiples of seven or not(java)
Answers
Answered by
1
Answer:
import java.util.*;
class Multiples
{
public static void main(String arr[])
{
int a,b;
Scanner sc=new Scanner(System.in);
System.out.println(“Enter 2 integers:”);
a=sc.nextInt();
b=sc.nextInt();
if(a%7==0 && b%7==0)
System.out.println(“Both are multiples of 7”);
else
System.out.println(“Both are not multiples of 7”);
}
}
Similar questions
Math,
3 months ago
Math,
6 months ago
Accountancy,
6 months ago
English,
11 months ago
Science,
11 months ago