rss
Twitter Delicious Facebook Digg Stumbleupon Favorites

Friday, October 7, 2011

Find the smallest number among three numbers


class Smallest {
public static void main( String[] args ) {
  int a=7;
  int b=14;
  int c=34;
 if (a<b){if (a<c){System.out.println("A is the smallest");}
 else{ System.out.println("C");}

 }else{ if (b<c){System.out.println("B is the smallest");}
 else{System.out.println("C is the smallest");}}



}


}

7 comments:

Saroja Patra said...

thanks a lot....u r genius

Anonymous said...

thanks.

Hanok said...

thq :-)

Unknown said...

super

Unknown said...

Any other way using if else


Shah fahad said...

Not too good

Unknown said...

Bro akhari Mai sirf 3 bracket lagte hai

Post a Comment

Powered by Blogger.