The objective is this:
Row 1: A-L
Row 2: M-ZWrite a program that takes as input a student\'s full name (first last) and prints out the
An easy solution would be to use the ascii value of the char.
int m = (int)'M';
name = name.toUpperCase();
int initial = (int)name.charAt(0);
if(initial < m)
{
System.out.println(" This student can sit anywhere in row 1. ");
}
else
{
System.out.println(" This student can sit anywhere in row 2. ");
}