Is it compiling? I am not 100% confident with c++ but I don't think what your doing is possible. Try something like this...
final_grade = (.4*midterm)+(.6*final);
jasweb2002
Junior Poster in Training
56 posts since Sep 2004
Reputation Points: 11
Solved Threads: 2
average=(.4f*midterm)+(.6f*final);
What are the f's for?
jasweb2002
Junior Poster in Training
56 posts since Sep 2004
Reputation Points: 11
Solved Threads: 2
In Java you would write .4f to force the floating point literal into a float instead of a double datatype.
Don't think C++ works like that.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337