0

C++ item 21

Whats wrong with my code?

22nd Feb 2022, 8:11 PM
Antonio Torres
Antonio Torres - avatar
10 Answers
+ 5
B should be uppercase in Beep
23rd Feb 2022, 2:08 AM
Simba
Simba - avatar
+ 4
Cool it works now thanks Simba the solution was b -> B in "Beep" 👍
23rd Feb 2022, 3:03 AM
Antonio Torres
Antonio Torres - avatar
+ 2
Idk
22nd Feb 2022, 8:17 PM
Martin Turcotte Couture
+ 2
Tag the programming language you're using, you didn't tag anything(how's that possible?)
23rd Feb 2022, 2:30 AM
Rishi
Rishi - avatar
+ 2
Manav Roy he was referring about countdown project of c++ course. Conditional and loops module code project.
23rd Feb 2022, 5:27 AM
Simba
Simba - avatar
+ 1
Thanks but the app does not validate me
22nd Feb 2022, 8:23 PM
Antonio Torres
Antonio Torres - avatar
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; }
22nd Feb 2022, 8:26 PM
Antonio Torres
Antonio Torres - avatar