Advertisement
Guest User

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

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