egy science
Tuesday, November 20, 2012
C++: Finding area of a circle(function)
#include<iostream.h>
float area(int x,float a )
{
a = (x*x)*(3.14);
return a;
}
int main()
{
float a,int x;
cout<<"enter x"<<endl;cin>>x;
a = (x*x)*(3.14);
cout<<"area="<<a;
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment