Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //12.2
- #include <iostream>
- #include <cmath>
- using namespace std;
- double s(double a,double b,double c){
- double p;
- p=(a+b+c)/2.0;
- return (sqrt(p*(p-a)*(p-b)*(p-c)));
- }
- double s(double r){
- return (r*r*M_PI);
- }
- int main()
- {
- double a,b,c,r;
- cin>> a>>b>>c>>r;
- cout <<s(a,b,c)<<"\t"<<s(r);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement