Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int a=0;
  6. int b=0;
  7. int c=0;
  8. int d=0;
  9. int sumaab=0;
  10. int sumabc=0;
  11. int kwadrat1=0;
  12. int kwadrat2=0;
  13. int main()
  14. {
  15. cout << "Hello world!" << endl;
  16. cout << "Podaj a :" << endl;
  17. cin >> a;
  18. cout << "Podaj b :" << endl;
  19. cin >> b;
  20. cout << "Podaj c :" << endl;
  21. cin >> c;
  22. cout << "Podaj d :" << endl;
  23. cin >> d;
  24. sumaab=a+b;
  25. sumabc=b+c;
  26. kwadrat1=a*a;
  27. kwadrat2=b*b;
  28. if (sumaab>sumabc)
  29. cout<<"Suma a oraz b wynosi :" << sumaab << endl;
  30.  
  31. if (a,b%2==0){
  32. cout<<"Kwadrat a wynosi :" << kwadrat1 << endl;
  33. cout<<"Kwadrat b wynosi :" <<kwadrat2 << endl;
  34. }
  35. else{
  36. cout<<"Jedna z liczb nie jest parzysta"<<endl;
  37. }
  38.  
  39.  
  40.  
  41.  
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement