Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #define M_PI 3.14159265359
- #define M_2PI 6.28318530718
- inline long double pole_okregu(long double r)
- {
- return M_PI * (r*r);
- }
- inline long double obwod_okregu(long double r)
- {
- return M_2PI * r;
- }
- int main()
- {
- long double promien;
- cout << "Podaj promien okregu: ";
- cin >> promien;
- cout << endl;
- cout << "Pole okregu o podanym promieniu wynosi: " << pole_okregu(promien);
- cout << endl << endl;
- cout << "Obwod okregu o podanym promieniu wynosi: " << obwod_okregu(promien);
- cout << endl << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment