Haytham_Shalabi

Question 4

May 17th, 2020
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class Main
  5. {
  6.  
  7.   public static void main (String[]args)
  8.   {
  9.  
  10.     Scanner scanner = new Scanner (System.in);
  11.    
  12.     System.out.println("الرجاء ادخال الرقم:");
  13.     int number = scanner.nextInt();
  14.     if (number % 3 == 0) {
  15.         System.out.println("هذا الرقم يقبل القسمه على 3");
  16.     } else {
  17.         System.out.println("هذا الرقم لا يقبل القسمه على 3");
  18.     }
  19.   }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment