Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Objects;
- import java.util.Scanner;
- import java.io.PrintStream;
- public class Problem1 {
- public static void main(String args[]) throws java.io.UnsupportedEncodingException{
- PrintStream ps = new PrintStream(System.out, true, "UTF-8");
- Scanner in = new Scanner(System.in);
- String name;
- ps.println("Введите сокращенное имя: ");
- name = in.nextLine();
- if (Objects.equals(name, "Вова"))
- ps.println("Владимир");
- else
- if (Objects.equals(name, "Костя"))
- ps.println("Константин");
- else
- if (Objects.equals(name, "Дима"))
- ps.println("Дмитрий");
- else
- if (Objects.equals(name, "Паша"))
- ps.println("Павел");
- else
- if (Objects.equals(name, "Юра"))
- ps.println("Юрий");
- else
- ps.println("Я с вами не знаком!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement