fork download
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main(){
  5. float a,b,c,e,p;
  6. cout<<"Δώσε πλευρές α και β:"<<endl;
  7. cin>>a>>b;
  8. c=sqrt(a*a+b*b);
  9. e=a*b/2;
  10. p=a+b+c;
  11. cout<<"Εμβαδό="<<e<<endl;
  12. cout<<"Περίμετρος="<<p<<endl;
  13. return 0;}
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Δώσε πλευρές α και β:
Εμβαδό=-6.65766e-10
Περίμετρος=inf