Advertisement
Guest User

שלוש ספרות קפולות של7 dowhile

a guest
Aug 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Dowhile2 {
  4.     public static void main(String[] args) {
  5.         Scanner s=new Scanner(System.in);
  6.         int num;
  7.         do {
  8.             System.out.println("please give me a number");
  9.             num=s.nextInt();
  10.         }while (!(num>=100&&num<=999&&num%7==0));
  11.         System.out.println(num);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement