Last active
July 12, 2017 07:32
-
-
Save SteelPh0enix/63af57050e095ac56a56cfb6b11168c3 to your computer and use it in GitHub Desktop.
little prettier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| int main() { | |
| //tworzymy i inicjalizujemy dwie zmienne o typie bool | |
| bool x {true}, y {false}; | |
| //tworzymy zmienną 'z' i inicjalizujemy ją zanegowaną wartoscią zmiennej x (czyli false) | |
| bool z {!x}; | |
| //przypisujemy zmiennej 'x' wartosc wyrazenia y OR z, czyli false (poniewaz ani y ani z nie mają wartosci true) | |
| x = y || z; | |
| std::cout << std::boolalpha | |
| << x << ", " | |
| << y << ", " | |
| << z << ", " | |
| << !(y && z) << std::endl; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment