Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a=0;
- int b=0;
- int c=0;
- int d=0;
- int sumaab=0;
- int sumabc=0;
- int kwadrat1=0;
- int kwadrat2=0;
- int main()
- {
- cout << "Hello world!" << endl;
- cout << "Podaj a :" << endl;
- cin >> a;
- cout << "Podaj b :" << endl;
- cin >> b;
- cout << "Podaj c :" << endl;
- cin >> c;
- cout << "Podaj d :" << endl;
- cin >> d;
- sumaab=a+b;
- sumabc=b+c;
- kwadrat1=a*a;
- kwadrat2=b*b;
- if (sumaab>sumabc)
- cout<<"Suma a oraz b wynosi :" << sumaab << endl;
- if (a,b%2==0){
- cout<<"Kwadrat a wynosi :" << kwadrat1 << endl;
- cout<<"Kwadrat b wynosi :" <<kwadrat2 << endl;
- }
- else{
- cout<<"Jedna z liczb nie jest parzysta"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement