0

式には (ポインターへの) 関数型が必要であるというエラー メッセージが表示されます。私は何を間違っていますか?私はコーディングを始めたばかりです。作業距離の式を取得する方法がわかりません。

#include <cmath>    //headerfile
#include <iomanip>
#include <iostream>

    enter code here

using namespace std;

int main()
{
    double d;
    double t;
    double g;
    char choice ='y';



    //output numbers to console


    while (choice == 'y' || choice =='Y')
    {
        cout<<"Please input a value for the time"<< endl<<endl;
        cin>>t;

        g = 32;
        d = (g)(t*t);

        if (t<0)
            cout<<"You cannot have a negative time"<<endl<<endl;

        else


        cout<<setw(8)<<fixed<<setprecision(2)<<"\n""The distance the ball has fallen is "<<d<<" feet"<<endl<<endl;

        cout<<"Would you like to run this again? y for yes, any other key for no."<< endl<<endl;
        cin>>choice;
        cout<<endl;


    }
system ("Pause");
return 0;

}
4

2 に答える 2