Im an AP computer science studen (we started two weeks ago so I dont know much). For homework we had this problem: " Write a program that will let you enter your gender (M or F) and your height in inches and will then tell you wether you are tall,medium or short. Men are tall if over 72 inches and short if under 66 inches. Girls are tall if over 66 inches and short if under 60 inches." The code I have so far is totally messed up. Anyhelp would be great appreciated. Thank you.
import java.io.*;
public class work
{public static input in = new input();
public static void main(String[] args) throws IOException
{ int height;
String gender;
System.out.println("Enter gender:");
gender = in.getString();
System.out.println("Enter height in inches:");
height = in.getInt();
if (gender==m && height>72)
System.out.println("You are tall");
if (gender==m && height>66)
System.out.println("You are medium");
else if (gender==m && height<67)
System.out.println("You are small");
}
}