Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Dowhile2 {
- public static void main(String[] args) {
- Scanner s=new Scanner(System.in);
- int num;
- do {
- System.out.println("please give me a number");
- num=s.nextInt();
- }while (!(num>=100&&num<=999&&num%7==0));
- System.out.println(num);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement