0
C++ item 21
Whats wrong with my code?
10 Answers
+ 5
B should be uppercase in Beep
+ 4
Cool it works now thanks Simba the solution was b -> B in "Beep" đ
+ 2
Idk
+ 2
Tag the programming language you're using, you didn't tag anything(how's that possible?)
+ 2
Manav Roy he was referring about countdown project of c++ course.
Conditional and loops module code project.
+ 1
Thanks but the app does not validate me
0
/*Necesitas hacer una app de cuenta atrĂĄs.
Dado un nĂșmero N como entrada, genera nĂșmeros de N a 1 en lĂneas separadas.
AdemĂĄs, cuando el nĂșmero actual de la cuenta atrĂĄs es un mĂșltiplo de 5, la app deberĂa producir "Beep".
Ejemplo de entrada:
12
Ejemplo de salida:
12
11
10
Beep
9
8
7
6
5
Beep
4
3
2
1*/
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i;
//tu cĂłdigo va aquĂ
for (i=n;i>0;i--)
if (i%5==0)cout<<i<<endl<<"beep"<<endl;
else cout << i << endl;
return 0;
}