C++ program for finding area of cirlce

in programming •  7 years ago  (edited)

 Program

A program is set of instruction given by user to computer to perform a specific task.computer program, in depth intend or else process in lieu of solving a riddle by means of a computer; supplementary specifically, an unambiguous, well thought-out string of computational advice indispensable near attain such a solution. 

Program Body

#include<iostream>
#include <string>
#include<math.h>
using namespace std;
class circle{
private:
    float pi,r,area;
public:
    void caluclation();
};
void circle::caluclation(){
pi=3.14;
cout<<"please enter the radius of circle"<<endl;
cin>>r;
area=pi*r*r;
cout<<"Are of circle is "<<area<<endl;
}
int main(){
circle obj;
obj.caluclation();
}

Written in C++

Source

made in Visual C++ IDE

Source
I hope you guys learned something and enjoyed it



Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

good post!

caluclation()? seriously?