Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Progammer: Nazmus //Program: Area and Circumference of a Circle //Purpose: Easy Programming Video //Website: EasyProgramming.net #include<iostream> using namespace std; void main() { double pi, radius, area, circumference, diameter; pi = 3.141592653589793238462643383279502884197169399375; cout << "Please input the value of the diameter: "; cin >> diameter; radius = diameter/2.; area = pi * (radius*radius); circumference = 2 * pi * radius; cout << "The area of the circle is " << area << " and the circumference is " << circumference << '.' << endl; system("pause"); }