mmayoub

Ex02, 19.06.2021

Jun 20th, 2021
636
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Ex02 {
  4.     public static void main(String[] args) {
  5.         Scanner in = new Scanner(System.in);
  6.         int y;
  7.  
  8.         System.out.print("Enter your grade (0 to 100): ");
  9.         y = in.nextInt();
  10.         while (y >= 0 && y <= 100) {
  11.             System.out.print("Enter your grade (0 to 100): ");
  12.             y = in.nextInt();
  13.         }
  14.         in.close();
  15.     }
  16. }
  17.  
RAW Paste Data