The code below is for my project in my subject which is c++. The code works fine but it seems like the output is inconsistent and weird. Would you please help me think of a solution to this error? I...