Facebook
From Hot Ibis, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 270
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. float pole (float bok)
  5. {
  6.     return bok*bok;
  7. }
  8. float suma(float a,float b)
  9. {
  10. return a+b;
  11. }
  12. float polp(float x,float y)
  13. {
  14.     return x*y;
  15. }
  16. float kula (float r)
  17. {
  18.     return (4/3)*3.14*r*r*r);;
  19. }
  20. int main()
  21. {
  22.  
  23.     float bok;
  24.     cout << "Pole kwadratu!" << endl;
  25.     cout <<"Podaj bok";
  26.     cin>>bok;
  27.     cout <<pole(bok)<<endl;
  28.     cout <<suma(2,3)<<endl;
  29.     cout <<"Pole prostokata"<<polp(3,5)<<endl;
  30.     cout <<"Kula"<<kula(2);
  31.     return 0;
  32.  
  33. }
  34. ;
  35.