// ProgrammingAssignmentSeven.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <cmath>
usingnamespace std;
constdouble PI = 3.14;
// ===================
// Function Prototypes
// ===================
void Banner();
void Getvalue(double&);
double computeCircumference(double);
void computeArea(double&, double );
// ===============
int main() {
double c;
double radius = 0;
double area = 0;
double a;
Banner();
Getvalue(radius);
c = computeCircumference(radius);
a = computeArea(radius,area);
cout << c << endl;
cout << a << endl;
return 0;
} // Function Main
// ==================
// ==================
void Banner() {
cout << "================================================" << endl;
cout << "Welcome to my Programming Assignment Seven. " << endl;
cout << endl;
cout << "Please Enter a value for the radius of a circle." << endl;
cout << "I will tell the circumference and area of it. " << endl;
cout << "================================================" << endl;
cout << endl;
} // Function Banner
// ===================
// ==================
void Getvalue(double& radius2) {
cout << "Please enter your radius of a circle: ";
cin >> radius2;
} // Funciton Getvalue
// ======================
// ====================
double computeCircumference( double radius1) {
double c;
c = 2*PI*radius1;
return c;
}// Function computecircumference
// =================================
// ================
void computeArea(double radius2, double& a) {
a = PI*pow(radius2,2);
}
cannot convert from 'void' to 'double' This happens at the line 30.
The program does compute the Circumference, and I am trying to compute the Area, but it doesn't work. Please help me ^_^
Thank you.