C++ program for finding area of cirlce

in #programming7 years ago (edited)

 Program

<p dir="auto">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.  <h1>Program Body <pre><code>#include<iostream> <pre><code>#include <string> <pre><code>#include<math.h> <pre><code>using namespace std; <pre><code>class circle{ <pre><code>private: <pre><code>    float pi,r,area; <pre><code>public: <pre><code>    void caluclation(); <pre><code>}; <pre><code>void circle::caluclation(){ <pre><code>pi=3.14; <pre><code>cout<<"please enter the radius of circle"<<endl; <pre><code>cin>>r; <pre><code>area=pi*r*r; <pre><code>cout<<"Are of circle is "<<area<<endl; <pre><code>} <pre><code>int main(){ <pre><code>circle obj; <pre><code>obj.caluclation(); <pre><code>} <h1>Written in C++ <p dir="auto"><img src="https://images.hive.blog/768x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png" srcset="https://images.hive.blog/768x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png 1x, https://images.hive.blog/1536x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png 2x" /> <p dir="auto"><a href="http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Source <h1>made in Visual C++ IDE <h3><img src="https://images.hive.blog/768x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png" srcset="https://images.hive.blog/768x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png 1x, https://images.hive.blog/1536x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png 2x" /> <h3><a href="http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Source<br /> I hope you guys learned something and enjoyed it <p dir="auto"><br /> <p dir="auto"><br />
Sort:  

good post!

caluclation()? seriously?