1234567891011121314151617181920212223242526272829303132333435363738394041424344
#include<iostream.h> #include<math.h> float area(float x) { float z; z=3.14*x*x; return z; } float area(float x, y) { float z; z=3.14*x(x+sqrt(x*x+y*y)); //'x' is radius and 'y' is height. return z; } int area(int x) { float z; z=pow(x,2.0); return z; } void main() { float area(float); float area(float, float); int area(int); float z, y, x, p, q; int a,b; cout<<"Enter radius of circle="; cin>>z; p=area(z); cout<<"Area is="<<p; cout<<"\nEnter radius of cone="; cin>>x; cout<<"Enter height of cone="; cin>>y; q=area(x, y); cout<<"Area of cone is="<<q; cout<<"\nEnter side of square="; cin>>a; b=area(a); cout<<"Area of square is="<<b; }
z=3.14*x(x+sqrt(x*x+y*y));
z=3.14*x*(x+sqrt(x*x+y*y));