Facebook
From Gracious Meerkat, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 58
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. int a,b,H;
  6. int main()
  7. {
  8.    
  9.     cout << "Podaj dlugosc krawedzi a: "; cin >> a;
  10.     cout << "Podaj dlugosc krawedzi b: "; cin >> b;
  11.     cout << "Podaj wysokosc H: "; cin >> H; //jw
  12.  
  13.     if(a==0||b==0||H==0) {
  14.         cout << "Bledna wartosc - zero" << endl;    
  15.     }
  16.  
  17.     cout << "Objetosc prostopadloscianu wynosi = " << a*b*H << " cm^3" << endl;
  18.     getchar();
  19.     getchar();
  20.     return 0;
  21. }
  22.