Computer Science, asked by rupanjana43, 5 months ago

write a program to input two integers and check whether they are multiples of seven or not(java)​

Answers

Answered by roshanidhami82
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