I have to write a program to calculate the diameter, the circumference, and the area of a circle with a radius of 6.75. Please tell me what I am doing wrong...I am going on 5 hours, and I am lost:-( Any help would be greatly appreciated.
//************************************************
//Calculations of a circle program
//This program finds the diameter, circumference
//and the area of a circle with a preset radius.
//************************************************
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
float radius ;
float pi ;
int main()
{
radius = 6.75; //Size of radius
pi = 3.14159; //Size of PI
cout << "The radius of a circle is : "<< radius << endl;
diameter = 2*radius;
circumference = diameter * pi;
area = pi * radius * radius;
cout << "The diameter is " << diameter << endl;
cout << "The circumference is " << circumference << endl;
cout << "The area is " << area << endl;
return 0;
}