import java.util.Scanner;
public class LoopPatterns {
/**
* @param args
*/
public static void main(String[] args) {
public static double Largest {
Scanner s = new Scanner(System.in);
int num, largest = 0;
for ( int i = 1; i <= 10 ;i ++) {
System.out.print("Enter a number : ");
num = s.nextInt();
if ( num > largest)
largest = num;
}
System.out.println("Largest Number : " + largest);
public static double First {
String name1, name2, name3 ;
boolean b, b1;
int i, i1, i2,i3;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter first string: ");
name1 = scan.nextLine();
System.out.print("Enter second string: ");
name2 = scan.nextLine();
System.out.print("Enter third string: ");
name3 = scan.nextLine();
b = name1.equals(name2);
// Check if identical ignoring case
b1 = name1.equalsIgnoreCase(name2);
i = name1.compareTo(name2);
if (i < 0)
{
i1 = name1.compareToIgnoreCase(name3);
if (i1 < 0)
{
System.out.println(name1);
if (i1 > 0)
{
System.out.println(name3);
i2 = name2.compareToIgnoreCase(name3);
if (i2<0)
{
System.out.println(name2);
System.out.println(name3);
}
if (i2>0)
{
System.out.println(name3);
System.out.println(name2);
}
}
}
}
else if (i > 0)
{
i1 = name2.compareToIgnoreCase(name3);
if (i1 < 0)
{
System.out.println(name2);
if (i1 > 0)
{
i2 = name1.compareToIgnoreCase(name3);
if (i2<0)
{
System.out.println(name1);
System.out.println(name3);
}
if (i2>0)
{
System.out.println(name3);
System.out.println(name1);
}
}
}
}
}
}
}
}
this is my code for calculating the largest number from a set of numbers and returing a string in reverse order what are my errors ?