Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- float a,b,c,area,pre;
- cin>>a>>b>>c;
- cout.precision(1);
- if((a+b)>c && (c+a)>b && (b+c)>a)
- {
- pre = a+b+c;
- cout<<fixed<<"Perimetro = "<<pre<<endl;
- }
- else
- {
- area = ((a+b)/2)*c;
- cout<<fixed<<"Area = "<<area<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement