keymasterviriya1150

Untitled

Oct 6th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. //เฟินถังแก้ส หน้าผากเถิก ตั้งใจเรียนไอหมุอ้วน
  2. import java.util.Random;
  3. import java.util.Scanner;
  4.  
  5. public class MainProgram {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner sc = new Scanner(System.in);
  9.         while (true) {
  10.             int N = sc.nextInt();
  11.             if (N == 999) {
  12.                 break;
  13.             }
  14.             Random rand = new Random();
  15.             int fren[] = new int[50];
  16.             for (int i = 0; i < 50; i++) {
  17.                 fren[i] = rand.nextInt(99);
  18.             }
  19.             int c = 0;
  20.             for (int i = 0; i < 50; i++) {
  21.                 if (fren[i] == N) {
  22.                     c++;
  23.  
  24.                 }
  25.             }
  26.              if (c > 0) {
  27.                     System.out.println("Your are fuck");
  28.                 } else {
  29.                     System.out.println("Sry");
  30.                 }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment