fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. void Area(float r)
  5. {
  6. cout<<"\nArea of Circle is: "<<acos(-1)*r*r;
  7. }
  8.  
  9. void Area(float angle,float a,float b)
  10. {
  11. cout<<"\nArea of Triangle is: "<<a*b*(sin(angle*3.1416/180)/(int)2);
  12. }
  13.  
  14. void Area(float a,float b)
  15. {
  16. cout<<"\nArea of rectangle is: "<<a*b;
  17. }
  18. int main()
  19. {
  20. float a,b,c;
  21. cout<<"\nEnter Degree and two arm of a triangle: ";
  22. cin>>a>>b>>c;
  23. Area(a,b,c);
  24. cout<<"\nEnter radius of a circle: ";
  25. cin>>a;
  26. Area(a);
  27. cout<<"\nEnter length and width of a rectengle: ";
  28. cin>>a>>b;
  29. Area(a,b);
  30. //cout<<endl<<sin(90);
  31.  
  32. return 0;
  33. }
  34.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Enter Degree and two arm of a triangle: 
Area of Triangle is: -0
Enter radius of a circle: 
Area of Circle is: 0
Enter length and width of a rectengle: 
Area of rectangle is: -0