Advertisement
pan7nikt

Promien_obwod_pole

Feb 18th, 2020
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. float r;
  5.  
  6. float obwod(float r)
  7. {
  8.     return 2 * r * 3.14;
  9. }
  10.  
  11. float pole(float r)
  12. {
  13.     return r * r * 3.14;
  14. }
  15.  
  16. main()
  17. {
  18.     cout << "Podaj promien kola: ";
  19.     cin >> r;
  20.     cout << "obwod tego kola wynosi: " << obwod(r) << endl;
  21.     cout << "pole tego kola wynosi: " << pole(r) << endl;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement