1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <iostream>
using namespace std;
double Calculate(int pts, int fg, int fga, int fta, int ft, int orb, int drb, int stl, int ast, int blk, int pf, int tov, float gmsc) {
double total;
total = pts + 0.4 * fg - 0.7 * fga - 0.4 * fta - ft + 0.7 * orb + 0.3 * drb + stl + 0.7 * ast + 0.7 * blk - 0.4 * pf - tov;
return total;
}
int main()
{
double calculate;
double gmsc, int pts, int fg, int fga, int fta, int ft, int orb, int drb, int stl, int ast, int blk, int pf, int tov;
cout << "Enter points";
cin >> pts ;
cin >> fg ;
cin >> fga ;
cin >> fta ;
cin >> ft ;
cin >> orb ;
cin >> drb ;
cin >> stl ;
cin >> ast ;
cin >> blk ;
cin >> pf ;
cin >> tov ;
gmsc = calculate (pts, fg, fga, fta, ft, orb, drb, stl, ast, blk, pf, tov);
cout << gmsc;
return 0;
}
|