+ 1

How do i align output?

The output i receive is not aligned at all... Example : 12 11 10 Beep 9 etc. Code: #include <iostream> using namespace std; int main() { int n ; cin >> n ; do { cout << n << endl ; n-- ; if ( n%5 == 0 ) { cout << " Beep " << endl; } } while(n > 0) ; return 0 ; } I really have no idea at all. I've tried other loops yet the output is the same.

4th Dec 2021, 9:09 AM
A. Francis
A. Francis - avatar
1 ответ
+ 4
The Beep without spaces "Beep".
4th Dec 2021, 9:12 AM
JaScript
JaScript - avatar