Advertisement
Felanpro

Circle Area Calculator

Dec 27th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     cout << "Circle Area Calculator (cm2)" << endl;
  8.     cout << "****************************" << endl;
  9.     cout << "" << endl;
  10.     system("pause");
  11.  
  12.     double diameterInput;
  13.  
  14.     cout << "Input the diameter of your circle: ";
  15.     cin >> diameterInput;
  16.     system("pause");
  17.     system("cls");
  18.  
  19.     double diameterAfterPI = diameterInput * 3.1415926536;
  20.  
  21.     cout << "The Area of the circle is:   " << diameterAfterPI << "  (cm2)" << endl;
  22.    
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement