阅读背景:

在我的主函数中,在'int'之前有一些类型为" expected primary-expression "的错误。怎么了?

来源:互联网 
#include <iostream>

using namespace std;

const double PI = 3.14;

void ReadinputData(int& a, int& b){

cout << " Give me the height of the Cylinder: ";
cin >> a ;
cout << " Give me the radious of its base: ";
cin >> b ;

}


void ComputetheResults(int a,int b,int &x,int &y){

x= 2*PI*b*a;
y= PI*a*b*b;

}

void DisplayAnswers(int a, int b){

cout<< "the surface are of the cylinder is: "<< a<< endl;
cout<< "the volume of the cylinder is: "<< b << endl;

}


int main()
{
int h,r,A,V;
h=0;
r=0;
A=0;
V=0;
ReadinputData(int h, int r);
ComputetheResults(int h,int r,int &A,int &V);
DisplayAnswers(int A,int V);

}
#include <iostream>

using namespace std;

cons



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: