Computer Science, asked by srinu4938, 3 months ago

Write a program to input 2 integers and check whether both the numbers are multiples of 7 or not.

Answers

Answered by anindyaadhikari13
3

Question:-

➡ Write a program to input 2 integers and check whether both the numbers are multiples of 7 or not.

Program:-

This is written in Python.

a, b=int(input()), int(input())

if a%7==0 and b%7==0:

print("Both numbers are multiple of 7.")

else:

print("Both numbers are not a multiple of 7.")

Answered by BrainlyProgrammer
7

Answer:

\huge\star\underbrace{\mathtt\pink{⫷QúÊßTïØñ⫸}}\star

  • Write a program to input 2 integers and check whether both the numbers are multiples of 7 or not.

\huge\star\underbrace{\mathtt\red{⫷❥ᴀ᭄} \mathtt\green{n~ }\mathtt\blue{ §} \mathtt\purple{₩}\mathtt\orange{Σ} \mathtt\pink{R⫸}}\star

  • This is done in JAVA

import java.util.*;

class integers

{

public static void main(String ar[])

{

Scanner sc=new Scanner (System.in);

System.out.println("Enter 2 numbers");

int a=sc.nextInt();

int b=sc.nextInt();

if (a%7==0)&&(b%7==0)

System.out.println("Multiple of 7");

else

System.out.println("Not multiple of 7");

}

}

Similar questions