Zmodyfikuj kod programu podanego na początku strony w taki sposób, aby do wypełnienia tablicy danymi została wykorzystana pętla typu while. class Main { public static void main (String args[]) { short tablica[] = new short[10]; for(short i = 0; i < tablica.length; i++){ tablica[i] = i; } for(short i = 0; i < tablica.length; i++){ System.out.println("tablica[" + i + "] = " + tablica[i]); } }}
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
i=0;
while(i<tablica.length) {
i++;
System.out.println("tablica[" + i + "] = " + tablica[i]);
};