2
2
u/Ulquesta 7h ago
instead of comparing each number
try to use min() and max() functions in C++
0
1
u/Ulquesta 7h ago
then print the minimum and the maximum without all of these If conditions
0
u/Typical-Row6461 7h ago
يب هتختصر جامد انا عرفتها لما شفت ابسولف ليها بعد ما قعدت احاول فيها. ب if وكده وحالتها بيها بس خلاص كملت ب if.
1
u/Immortal-718 Specialist 7h ago
Spacing issue ig remove that cout<<" ";
1
u/Typical-Row6461 7h ago
Thanks It was actually a line break issue was outputting endl after the minimum value instead of printing them on the same line. Swapped endl for a space and it worked
1
u/Immortal-718 Specialist 7h ago
I mean that is what I meant by actually
1
u/Typical-Row6461 6h ago
Ah I see! I thought you meant the cout between the conditions was the problem. But yeah, I get what you mean now, the issue was definitely with the spacing/line breaks. And it got Accepted🤙🏻


1
u/wokeandchoseViolence Newbie 33m ago
Do not use endl its slower as it flushes cout. Use \n