Skip to content

Instantly share code, notes, and snippets.

@thetekst
Created February 18, 2011 08:04
Show Gist options
  • Save thetekst/833403 to your computer and use it in GitHub Desktop.
Save thetekst/833403 to your computer and use it in GitHub Desktop.
1.4 Java home
System.out.println("Введите ваше имя:");
String name = in.nextInt();
System.out.println("Выберите ваш пол:\n1 - мужской\n2 - женский");
String sex = in.nextInt();
if(sex == 1) {
System.out.println("Уважаемый " + name);
}
else {
System.out.println("Уважаемая " + name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment