Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- /*
- Amon Guinan
- Wednesday, January 23, 2019
- Random numbers between 3 and 7.
- Until it prints 5.
- */
- import java.util.Random;
- public class six_twentyOne {
- public static void main(String [] args)
- {
- Random random = new Random();
- int i;
- do {
- i = random.nextInt(5) + 3;
- System.out.print(i);
- System.out.print(" ");
- }
- while(i!=5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement