Question
So i have this homework question and I did it this way which it was wrong , i had some comments on how it should've
So i have this homework question and I did it this way which it was wrong , i had some comments on how it should've done can you please help me resolving the question? so I can understand how it should've be been done and we are my mistakes.
https://onlinegdb.com/GBEyKGIqA
The comment was: The remaining code isn't flexible. Meaning, you are artificially putting in the right number of spaces to look good. If the numbers change, you'd have to change the spaces as well. That's inefficient and inflexible. The setw() function can pad the display to make sure that the same number of spaces are used per display.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started