Advertisement
Azazavr

com.javarush.test.level04.lesson06.task01

Oct 16th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. package com.javarush.test.level04.lesson06.task01;
  2.  
  3. /* Минимум двух чисел
  4. Ввести с клавиатуры два числа, и вывести на экран минимальное из них.
  5. */
  6.  
  7. import java.io.*;
  8.  
  9. public class Solution
  10. {
  11.     public static void main(String[] args) throws Exception
  12.     {
  13.         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  14.         int a = Integer.parseInt(reader.readLine());
  15.         int b = Integer.parseInt(reader.readLine());
  16.  
  17.         if(a>b){
  18.             System.out.println(b);
  19.         }
  20.         else
  21.             System.out.println(a);
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement