(20點)急~~~~~~~我要考試了幫幫我(解題)C++

錯誤的做定正? 螢幕顯示?

#include<iostream.h>

void a(int,int);//area

int a1(int,int,int);//volume

void b(int,int,int,int*,int*)//area and volume

void main(void)

{ clrscr();

int l,w,h,area;

cout>>"input long,width,hifh";cin>>l>>w>>h;

area=a(l,w);

voi=al(area,h);

cout<<"area="<<area<<volume"<<vol<<endl=";

cout>>"input long,width,high=";cin>>l>>w>>h;

cout<<"area="<<area<<"volume="<<vol<<endl;}

int a(fl,fw);

{int a; a=fl*fw;returu(a);

int al,fa,fh;

{ return(fa*fl);}

void b(int fl,int,fw,int fh,int pa,int pv);

{pa=fl*fv=fl*fw*fv);

} }

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    #include<iostream.h>

    using namespace std;

    int a(int,int);//area

    int al(int,int);//volume

    void b(int,int,int,int*,int*);//area and volume

    int main(void)

    {

    clrscr( ); //若非Turbo C,請改用 system("cls");

    int l,w,h,area,vol;

    cout<<"input long,width,high="; cin>>l>>w>>h;

    area=a(l,w);

    vol=al(area,h);

    cout<<"area="<<area<<"\t"<<"volume="<<vol<<endl;

    cout<<"input long,width,high="; cin>>l>>w>>h;

    b(l, w, h, &area, &vol);

    cout<<"area="<<area<<"\t"<<"volume="<<vol<<endl;

    }

    int a(int fl, int fw)

    {int a; a=fl*fw; return (a);}

    int al(int fa, int fh)

    { return fa*fh;}

    void b(int fl,int fw,int fh,int *pa,int *pv)

    {*pa=fl*fw; *pv=*pa*fh;}

Still have questions? Get your answers by asking now.