Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Ehepaar
- {
- public static void main(String[] args)
- {
- int boys = 0;
- int girls = 0;
- while(boys < 1 || girls < 1)
- {
- if(Math.random() > 0.5)
- boys++;
- else
- girls++;
- }
- System.out.println("Boys: " + boys);
- System.out.println("Girls: " + girls);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement