Given an integer n, check whether it is a multiple of 7 or not. If the number is divisible by 7, then return true else return false.
Constraints
1 <= n <= 1000
Sample TestCase
Input
27
Output
0
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class MultipleOfSeven {
public static boolean sevenBySeven(int num){
if(num%7==0){
return true;
}else{
return false;
}
public static void main(String[] args) throws IOException{
Scanner in = new Scanner(System.in);
boolean output;
int ip1 = Integer.parseInt(in.nextLine().trim());
output = sevenBySeven(ip1);
System.out.println(String.valueOf(output ? 1 : 0));
}
}

