Hi gurus,
kindly help me in tracking these errors. The purpose of the program is to calculate the area and circumference of a circle using struct. the details stored are its name, radius, area and circumference. thank you
#include <iostream>
#include <iomanip>
#include<cmath>
using namespace std;
struct circle {
int radius;
float circumference;
float area;
float compute_area()
{
area = (radius*radius* 3.14);
return(area);
}
float compute_circumference()
{
circumference=(2*radius*3.14);
return (circumference);
}
main(int) {
string name;
circle test;
char reply;
do {
cin.ignore(80);
system("cls");
cout << "Enter the name of the Circle : ";
getline(cin,test.name);
cout << "Enter the given Radius of the Circle : ";
cin >> test.radius;
cout << "\nThe Area of the Circle is : ";
cout<< test.compute_area() << test.compute_circumference();
cout << "\n\n";
cout << "Do you want to continue y/n : ";
cin >> reply;
if (toupper(reply) == 'N') {
cout << "\n\n";
cout << "\t\t Thank You For Using This Software !!!";
break;
}
} while (toupper(reply!='Y'));
cout << "\n\n";
system("pause");
}