C++ program for finding area of cirlce

in #programming7 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



Sort:  

good post!

caluclation()? seriously?