![]() |
![]() |
|
![]() |
![]() |
|
Programmierung Rat & Tat für Programmierer |
![]() |
|
Themen-Optionen | Ansicht |
|
![]() |
#1 |
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
![]() Die Abbruchbedingung ist, daß ((a == 0) && (b==0)), d.h. man könnte schreiben
while(!((a == 0) && (b==0))){ ... } das ist aber das selbe wie (a!=0) || (b!=0). Beim verneinen von Aussagen wird alles umgekehrt, aus && wird also ||. Tabelle Code:
|A|B|(a == 0) && (b==0)|(a!=0) || (b!=0) |1|0|(0)&&(1) = 0 |(1)||(0) = 1 |1|1|(0)&&(0) = 0 |(1)||(1) = 1 |0|0|(1)&&(1) = 1 |(0)||(0) = 0 |0|1|(1)&&(0) = 0 |(0)||(1) = 1 jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona) Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing. \"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra) |
![]() |
![]() |
![]() |
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|