Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- float pole (float r, float h)
- {
- float wynik = 2*M_PI*r*h+2*M_PI*pow(r, 2);
- return wynik;
- }
- int main()
- {
- float promien = 8;
- float wysokosc = 4;
- cout << "promien wynosi: " << pole(promien) << endl;
- cout << "wysokosc wynosi: " << pole(wysokosc) << endl;
- cout << "pole powierzchni wynosi: " <<pole(promien, wysokosc) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement