Out of boredom... The crazy me, thinking for a long whether to cut hair or not... seriously my hair is longgggg... shud I keep it or let it grow longer? Maybe I will look better in that way.. Or maybe not.. haha, nvm.. Suddenly i come out with a stupid idea.. which is write a java code to decide whether I shud cut or not. .. Muahahaha ! Stupid hor.. * Toss coin some more easy la... * I know la, but since I am student of Com Science... I shud practice my knowledge ma..if not it will get rusty later... *though already rusty..* lolx.. ok, let see what I get..
import java.util.Scanner;
public class CutOrNotCut {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.println("This program is design to help me to decide whether I shud cut hair or not? ");
System.out.print("\n\nPress 1 to run the program... : ");
int option = input.nextInt();
if(option == 1 ){
Decider();
}
else
System.out.println("\n\ndon't simply press other num la, stupid !");
System.exit(0);
}
public static void Decider(){
Scanner input = new Scanner (System.in);
int toss = (int)(Math.random()*2);
if(toss==0)
System.out.println("\n\n Holim go cut hair ! Ur hair is too long and ugly ! !");
else
System.out.println("\n\nHolim, don't need cut hair.. keep it as long as you want.. suit you..haha");
}
}
.....................................................................................................................................................................
The Output.....
Press 1 to run the program... : 1
Holim go cut hair ! Ur hair is too long and ugly ! !
Process completed.
This result kinda dissappointing.... (=_=" ) . . Anywhere, I believe that program won't lie and have make a fair random decision... ok la.. I will cut my hair before sem start... Cut very short or normal ? I dunno... later rewrite a program to decide again... Hahahahahahaha...
2 comments:
Geng wor...
Start applying wt u learnt dy... Haha...
hahaha, wei seetoh, shogun really cannot match jogoya la after i see ur blog... wasai, must really save money and go there try out one day..haha
Post a Comment