import java.util.*; import java.util.concurrent.ThreadLocalRandom; public class Main { public static void main(String[] args) { double rand_dub1 = ThreadLocalRandom.current().nextDouble(1000000.000); double wynik; System.out.println("\n Wartość portfela wynosi " + rand_dub1); System.out.println("\n Jaką kwątę chcesz pobrać?"); Scanner skaner = new Scanner(System.in); double kwota = skaner.nextDouble(); wynik = rand_dub1 - kwota; System.out.println("\n Pozostała kwota w portfelu to: "+wynik); } }