All you have to do is change the program to this.
Import java.util.scanner;
Public category weight {
/**
* @param args
*/
Public static void main(String[] args) {
// TODO automatically generated method stub
String str
char st
Scanner scan = new scanner (system. in);
System.out.print ("Please enter your gender (F or M):");
str = scan . nextline();
ST = str . charat(0);
if(st=='F'||st=='f ')
{
Float i, height, weight, k, l = 0;;
System.out.print ("Please enter your height (height & gt=5):");
height = scan . next float();
If (height & gt5)
{
For(I = height; I>= 1; I-);
For(k=(int) height; k & gt5; k-)l++;
Weight = (I *10+l *12) * 5+100;
System. out.print ("weight ="+weight+"points." );
}
Elseif (height = = 5) system. out.print ("weight =100lb");
Else System.out.print ("error ...");
}
else if(st=='M'||st=='m ')
{
Float i, height, weight, k, l = 0;;
System.out.print ("Please enter your height (height & gt=6):");
height = scan . next float();
If (height & gt5)
{
For(I = height; I>= 1; I-);
For(k=(int) height; k & gt5; k-)l++;
Weight = (I *10+l *12) * 6+106;
System. out.print ("weight ="+weight+"pound");
}
Elseif (height = = 5) system. out.print ("weight =106 lb");
Else System.out.print ("error ...");
}
Else System.out.print ("error ...");
}
}