写一个if语句,判断整数n是否同时满足“被3除余2,被7除余
import java.util.Scanner;
public class If {
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("please enter the number");
int n =in.nextInt();
if((n%3==2)&&(n%7==1))
System.out.println("ok");
else
System.out.println("no");
}
}