Advertisement
Guest User

Sinitsyn_25.03.2020-3

a guest
Mar 28th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package ru.itsjava.conditionalStatements.homework;
  2.  
  3. import java.util.Scanner;
  4.  
  5. // 3. Найти минимум из двух чисел
  6. public class MinOfTwo {
  7.     public static void main(String[] args) {
  8.         Scanner numbers = new Scanner(System.in);
  9.         System.out.println("Введите первое число:");
  10.         int num1 = numbers.nextInt();
  11.         System.out.println("Введите второе число:");
  12.         int num2 = numbers.nextInt();
  13.         System.out.println("Минимальное значение: " + Math.min(num1, num2));
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement