package com.company; import java.util.Scanner; public class Dialog { static void inputValue() { System.out.print("Wprowadź liczbę: "); } } public class Main { public static int value; public static void main(String[] args) { int result = 1; while (value != 5) { Scanner scanner = new Scanner(System.in); Dialog.inputValue(); value = scanner.nextInt(); result = result * value; } System.out.println("Podano liczbę : " + value); System.out.println("Iloczyn podanych liczb to : " + result); } }