Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <iostream>
- using namespace std;
- int main()
- {
- bool a, b, c;
- cin>>a;
- cin>>b;
- cout<<"Warunek a||b: ";
- if(a||b)
- {
- c=true;
- cout<<c;
- }
- else
- {
- c=false;
- cout<<c;
- }
- cout<<endl;
- cout<<"Warunek a&&b: ";
- if(a&&b)
- {
- c=1;
- cout<<c;
- }
- else
- {
- c=0;
- cout<<c;
- }
- cout<<endl;
- cout<<"Warunek !(a&&b): ";
- if(!(a&&b))
- {
- c=1;
- cout<<c;
- }
- else
- {
- c=0;
- cout<<c;
- }
- cout<<endl;
- cout<<"Warunek !(a||b): ";
- if(!(a||b))
- {
- c=1;
- cout<<c;
- }
- else
- {
- c=0;
- cout<<c;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement