" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
public class Zadanie
{
public static void main(String args[]) throws Exception
{
String nowaLinia;
String mojeImie = "";
int liczbaLiter = 0;
do
{
liczbaLiter += 1;
System.out.print("Wprowadz litre " + liczbaLiter + ":");
nowaLinia = (new BufferedReader(new InputStreamReader(System.in))).readLine();
if (nowaLinia.length() > 0)
{
mojeImie = mojeImie + nowaLinia.charAt(0);
}
}
while (nowaLinia.length() > 0 && liczbaLiter < 10);
System.out.println(mojeImie);
}
}