I know the below code is riddled with errors. I am very new to C++ and I can run simple codes however this is my first time trying to do something this complicated. Well lets say complicated for me. Any help or suggestions are greatly appreciated.
Code:
# include <iostream>
# include <string>
# include <cmath>
# include <math.h>
using namespace std;
float PerformanceTE (float a, float b, float c, float T){
score = (a*(b-T)^c
return score;
}
float Performancej (float a, float b, float c, float M){
score = (a*(M-b)^c
return score;
}
float PerformanceTH (float a, float b, float c, float D){
score = (a*(D-b)^c
return score;
}
int main ()
{
float a[10] {25.4347, 0.14354, 51.39, 0.8465, 1.53775, 5.74352, 12.91, 0.2797, 10.14, 0.03768};
float b[10] {18.00, 220.00, 1.50, 75.00, 82.00, 28.50, 4.00, 100.00, 7.00, 480.00};
float c[10] {1.81, 1.40, 1.05, 1.42, 1.81, 1.92, 1.10, 1.35, 1.08, 1.85};
float M;
float T;
float D;
float string score[10];
string name[5];
float 100m;
float Long jump;
float Shot put;
float High jump;
float 400M;
float time;
float sum;
cout<< " Welcome to the 2011 CSMC Decathlon"<< endl;
cout<< " Day 1"<< endl;
cout<< " Your first event will be the 100M dash"<<;
cout<< " Enter your 100M dash time"<<;
cin>> 100M;}
T= 100m;
if (100M < 9.58)
{
cout<< " That's a new world record!";
}
else
{
cout<<" Your score is!"<< PerformanceTE = a[1]*(b[1]-T)^c[1];
system("Pause");
}
return 0;
{