package Pierwszy; import java.util.*; public class DodajDoWhile { public static void main(String[] args) { Scanner skaner = new Scanner(System.in); int wybor; float a,b,c; do { System.out.print("Ten program dodaje do siebie wartości rzeczywiste."); System.out.print("Podaj pierwsza liczbe: "); a = skaner.nextFloat(); System.out.print("Podaj druga liczbe: "); b = skaner.nextFloat(); c = a + b; System.out.println("suma wynosi: " + c); System.out.println("Czy chcesz dodawac? (1 - tak, inna wartosc konczy program)"); wybor = skaner.nextInt(); }while (wybor == 1); } }