Dec 15, 2013 at 12:05pm UTC
float solve ();
void DisplayRemarks ();
int main()
{
cout << "\n\n\n";
cout << "\n\t\t\t_____________________________________\t\t\t";
cout << "\n\t\t\t ==== SUMMARY RESULTS ====";
cout << "\n\t\t\t_____________________________________\t\t\t";
cout << "\n\t\t Number of Right Answers :=> "
<< right << ".";
cout << "\n\t\t Number of Wrong Answers :=> "
<< wrong << ".";
cout << "\n\n";
cout << "\n\t\t Your Grade : ";
solve();
cout << "\n\t\t Remarks : ";
DisplayRemarks ();
cout << "\n\n";
cout<<"\n\t\tFor playing again press 1 or 0 for exit :";
cin>>terminate;
}
while (terminate!=0) ;
return 0;
}
float displaysolve (float right, float wrong)
{
float s;
s= (right/10.0)*50+50;
return (s);
}
void DisplayRemarks ()
{
string remarks;
if (solve >= 75) { //in this line the error occurred.
remarks = "You Passed the Quiz Congrats !!!";}
else {
remarks = "Sorry you Failed the Quiz Try Again!!!";}
}
Last edited on Dec 16, 2013 at 3:12am UTC
Dec 15, 2013 at 12:22pm UTC
can you paste the exact error and the exact snippets where the error occurred ?
BTW, what is solve
?
Dec 16, 2013 at 3:14am UTC
the function of solve is to compute for the grade and so that the remarks will be identify.
Dec 16, 2013 at 10:21am UTC
Please use code tags when posting code, to make it readable.
If solve is a function, then:
if (solve >= 75) { //in this line the error occurred.
has an obvious mistake - that's not the syntax you use to call functions. I recommend you go back to your textbook and read up on how to call functions.