0
Does anyone can help me?You need to make a countdown app. Given a number N as input, output numbers from N to 1 on separate lin
And I also made the code steel has bug #include <iostream> using namespace std; int main() { int n; cin >> n; int i; do{ if (n%5 == 0) cout<<n<<endl<<"beep"<<endl; else cout <<n<<endl; --n; }while (i<n); return 0; }
2 ответов
0
You need to always cout n
and only cout beep when n is divisble by 5.
0
FYI you dont need i
In the while loop you want to check if n > 0