So, my program is all written out but I don't know how to use a switch statement to display a message on the output. For example,
if (miles_ran == 40)
{I would like to output to say "Good Run!"}
else if (miles ran >= 40)
{"I would want the output to say "Try Harder!"
and say my output section already looks like
cout << setw(15) "How you did today" << endl;
And output already is
Miles Ran: How you did today:
40
and I want it to be either
Miles Ran: 40 How you did: Great!
or
Miles Ran: 40
You did Great!
I actually only need to display a message for when the input is default, but I think the solution should be the same.
____________________________________
Also, like previously mentioned I already have my entire program written out. Only problem is I need it written to an output file. I've desperately tried searching the internet for a solution but I find it rather difficult to understand after I've already entered everything. I guess I can make up an example:
Your if/else if conditions are not properly written. As of now, you have two possible output messages for when miles_ran is 40. Try using elseif(miles_ran < 40) instead.