Commit dfa657bc by Patryk Czarnik

Pierwsza pętla while

parent 9b777656
...@@ -5,10 +5,14 @@ public class PierwszePetle { ...@@ -5,10 +5,14 @@ public class PierwszePetle {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Początek programu"); System.out.println("Początek programu");
while(2 + 2 == 4) { int a = 1;
System.out.println("Ala ma kota"); while(a < 5) {
} System.out.println("a = " + a);
// System.out.println("Koniec programu"); a++;
} }
System.out.println("Koniec pętli while. Teraz a = " + a);
System.out.println();
System.out.println("Koniec programu");
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment