Hallo Zusammen..
Bald ist die Klausur.
Wollte als übung eine aufgabe von der letzen klausur machen, doch :bahnhof:
..
Bald ist die Klausur.
Wollte als übung eine aufgabe von der letzen klausur machen, doch :bahnhof:
..
Bedingung f・ Terminierung ?
Variablen: int i, a, b; float x, y;
1. while (i!=0) { x+=2; i--}
2. while (y>0.5f) { x+=y; y*=y}
3. do {x = x*2; i = i/2} while (i!=0)
4. while (true) [x = x+2; i++; if (i==a) break}
Variablen: int i, a, b; float x, y;
1. while (i!=0) { x+=2; i--}
2. while (y>0.5f) { x+=y; y*=y}
3. do {x = x*2; i = i/2} while (i!=0)
4. while (true) [x = x+2; i++; if (i==a) break}
Zuletzt bearbeitet: