Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- // instrukcja warunkowa if
- int a, b;
- a = 10;
- b = 12;
- if(a >= b)
- cout << "a jest wieksze lub rowne b" << endl; // wyświetla tylko wtedy gdy a jest większe lub równe b
- else
- cout << "a jest mniejsze od b" << endl; // wyświetla w każdym innym przypadku
- /* operatory porównania:
- == równość (DWA znaki =)
- > większe
- >= większe równe
- < mniejsze
- <= mniejsze równe
- != różne od
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement