Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This program works like tossing a coin and gives randomly head or tails*/
- class Toss
- {
- public static void main(String args[])
- {
- int random=(int)(Math.random()*100);
- if((random%2)==0)
- System.out.println("Head");
- else
- System.out.println("Tails");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment