Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javarush.test.level03.lesson08.task02;
- /* Зарплата через 5 лет
- Ввести с клавиатуры Имя и два числа, вывести надпись:
- name1 получает «число1» через «число2» лет.
- Пример: Коля получает 3000 через 5 лет.
- */
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- public class Solution
- {
- public static void main(String[] args) throws Exception
- {
- BufferedReader reader=new BufferedReader (new InputStreamReader (System.in));
- String name=reader.readLine ();
- String sfirstChislo=reader.readLine();
- String ssecondChilso=reader.readLine ();
- int nfirstChislo =Integer.parseInt (sfirstChislo);
- int nsecondChilso=Integer.parseInt (ssecondChilso);
- System.out.println (name+" получает "+nfirstChislo+ " через "+nsecondChilso+" лет.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment