Facebook
From Adrian Pietrzak, 11 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 100
  1. package com.company;
  2. import java.util.Scanner;
  3.  
  4. public class Dialog {
  5.     static void inputValue() {
  6.         System.out.print("Wprowad┼║ liczb─Ö: ");
  7.     }
  8. }
  9.  
  10. public class Main {
  11.     public static int value;
  12.  
  13.     public static void main(String[] args) {
  14.  
  15.         int result = 1;
  16.  
  17.         while (value != 5) {
  18.             Scanner scanner = new Scanner(System.in);
  19.             Dialog.inputValue();
  20.             value = scanner.nextInt();
  21.             result = result * value;
  22.         }
  23.         System.out.println("Podano liczb─Ö : " + value);
  24.         System.out.println("Iloczyn podanych liczb to : " + result);
  25.     }
  26. }