# Need assistance with a code I'm developing

I don't have the info for making if-else nest with input and output. See if you can help me, with putting the right code so the compiler reads what I'm trying to execute

• Here is a easy example of nested if statements
This calculates the letter grade based on the percent entered.
btw, not sure if those percents are the actual academic numbers used...

[code]public class IFStatements {
int percent;

Scanner scan = new Scanner(System.in);
percent = scan.nextInt();

if(percent>69)
//if the value is not greater than 69, it jumps down to the else and displays a F
{
if(percent>75)
//if the value is not greater than 75, it jumps down to the else and displays a D
{
if(percent>85)
//if the value is not greater than 85, it jumps down to the else and displays a C
{
if(percent>93)
//if the value is not greater than 93, it jumps down to the else and displays a B, but if it is greater, its an A
{
System.out.println("A");
}
else
{
System.out.println("B");
}
}
else
{
System.out.println("C");
}
}
else
{
System.out.println("D");
}
}
else
{
System.out.println("F");
}
}
}
[/code]