Question: Hello I need help answering this question from my C++ code Why the output for these two identical sequences are not the same? This sequence

Hello I need help answering this question from my C++ code

Why the output for these two identical sequences are not the same? This sequence is in one statement: 5/6 11/6 5/6 5/6 11/6 5/6 The one below is broken into 6 steps: 5/6 5/6 -1/6 -1/6 5/6 -1/6 

Part of the code:

cout << "Why the output for these two identical sequences are not the same?" << endl << "Testing for string Frac (\"5/6\") using postfix ++ and --" << endl; Frac f4(5, 6); cout << "This sequence is in one statement: " << f4 << " " << f4-- << " " << f4 << " " << f4++ << " " << f4-- << " " << f4++ << endl << "The one below is broken into 6 steps: "; cout << " " << f4; cout << " " << f4--; cout << " " << f4; cout << " " << f4++; cout << " " << f4--; cout << " " << f4++;

cout << endl; cout << endl;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!