0

[TEXT]I'm trying to write an application that will input five numbers from the user. The program should print out the largest and smallest numbers. It should print how many of the numbers are two digit and how many of the numbers are three digit. It should also print out the sum of all two digit numbers and the sum of all three digit numbers. I have tried, but having problems, the code below executes but does not give the results needed, please help[/TEXT]

```
import java.util.Scanner;
public class minNmax
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int n1, n2, n3, n4, n5, Num2Digit=0, Num3Digit=0,Max=0, Min=0;
int Num2Sum, Num3Sum;
Num2Sum=Num2Digit;
Num3Sum=Num3Digit;
System.out.print("Enter first number: ");
n1 = input.nextInt();
System.out.print("Enter second number: ");
n2 = input.nextInt();
System.out.print("Enter third number: ");
n3 = input.nextInt();
System.out.print("Enter forth number: ");
n4 = input.nextInt();
System.out.print("Enter fifth number: ");
n5 = input.nextInt();
System.out.println("Sum of tow-digit numbers is ---> " + Num2Sum);
System.out.println("Sum of three-digit numbers is ---> " + Num3Sum);
System.out.println("There are total " + Num2Digit + " two digits numbers");
System.out.println("There are total " + Num3Digit + " three digits numbers");
System.out.println("The smallest number is " + Min);
System.out.println("The Largest numver is " + Max);
if(n1 >= 10)
{
n1=Num2Digit;
Num2Sum += n1;
Min +=1;
}
else if (n1 > 99)
{
n1=Num3Digit;
Num3Sum += n1;
Max +=1;
}
else if(n2 >= 10)
{
n2=Num2Digit;
Num2Sum += n2;
Min +=1;
}
else if (n3 > 99)
{
n2=Num3Digit;
Num3Sum +=n2;
Max +=1;
}
else if(n3 >= 10)
{
n3=Num2Digit;
Num2Sum += n3;
Min +=1;
}
else if (n3 > 99)
{
n3=Num3Digit;
Num3Sum +=n3;
Max +=1;
}
else if(n4 >= 10)
{
n4=Num2Digit;
Num2Sum += n4;
Min +=1;
}
else if (n4 > 99)
{
n4=Num3Digit;
Num3Sum += n4;
Max +=1;
}
else if(n5 >= 10)
{
n5=Num2Digit;
Num2Sum += n5;
Min +=1;
}
else if (n5 > 99)
{
n5=Num3Digit;
Num3Sum += n5;
Max +=1;
}
}
}
```

*Edited
by maverick420*: n/a