Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MarkIfTest {
- void checkIfMarkGetsValueOf5() {
- int x = 15;
- while (x > 0) {
- int mark = (int) (Math.random() * (6 - 2) + 2);
- x = x - 1;
- if (mark == 5) {
- System.out.println("Ayep, it works.");
- } else {
- System.out.println("Nah, it doesn't work.");
- }
- }
- }
- public static void main(String[] args) {
- MarkIfTest mark1 = new MarkIfTest();
- mark1.checkIfMarkGetsValueOf5();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement