3:53 pm - Thursday March 25, 1069

Java Example Program for smallest of three number

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
program : smallest three number.
author : "candid"
date :27.10.2012
*/
/Prgram

class Small
{
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");
}
}
}
}
}


output:

A is the smallest

Filed in: Z-A All Java Codes

Comments are closed.