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
Hindi,
2 months ago
Computer Science,
2 months ago
Math,
5 months ago
Accountancy,
5 months ago
English,
10 months ago
Science,
10 months ago