C++ program for finding area of cirlce

in #programming6 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?

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.029
BTC 61657.19
ETH 3452.67
USDT 1.00
SBD 2.52