Aerials
Apr 25th, 2002, 06:13 PM
I'm trying to make a prog that finds the area of a circle.
After asking the user the radius of the circle it should display the area after a calculation.
But the program wont display the final result. Why?
#include <iostream.h>
#include <conio.h>
int main()
{
int radius;
const double pi=3.14;
cout<<"Find the area of a circle!\n";
cout<<"Enter the radius of the circle you want to find the radius of(Works best with whole numbers): ";
cin>>radius;
cout<<"The area is: "<<(radius*pi);
getch();
return 0;
}
I'd appreciate if I could get help ASAP
After asking the user the radius of the circle it should display the area after a calculation.
But the program wont display the final result. Why?
#include <iostream.h>
#include <conio.h>
int main()
{
int radius;
const double pi=3.14;
cout<<"Find the area of a circle!\n";
cout<<"Enter the radius of the circle you want to find the radius of(Works best with whole numbers): ";
cin>>radius;
cout<<"The area is: "<<(radius*pi);
getch();
return 0;
}
I'd appreciate if I could get help ASAP