EliPerfanova

Untitled

Oct 12th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Graduation {
  4. public static void main(String[] args) {
  5. Scanner scan = new Scanner(System.in);
  6. int num = Integer.parseInt(scan.nextLine());
  7.  
  8. while (!(num >=1 && num <=100)) {
  9. System.out.println("Invalid number!" );
  10. num =Integer.parseInt(scan.nextLine())
  11. }
  12. System.out.println("The number is:" + а);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment