Back To Java Flow of Control Index
//program to input three numbers and find largest of three numbers using if-else statement public class largestthree { public static void main(String[] args) { int a,b,c,max; a=10; b=12; c=11; max=a; if(b>max) { max=b; } if(c>max) { max=c; } System.out.println("largest number in a,b,c is " + max); } }