+ 1
Count Down protect
I have a problem with count down proyect in C++. I code this: //your code is here for(int i=n; i>=1; i--){ cout<< i >> endl; if(i % 5==0){ cout>>"beeb">>endl; } } //Why don´t work? someone explein me...
7 Answers
+ 5
it would be:
cout << i << endl;
and it's probably 'beep' not 'beeb'
cout << "beep" << endl;
pay attention to the direction of the 'less than' signs
+ 1
What a fool i am....
+ 1
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
//tu código va aquí
for (; n > 0; n--){
cout << n << endl;
if (n % 5 == 0)
cout << "beeb"<< endl;
}
return 0;
}
+ 1
Man this is another answer but itn's work yet
+ 1
Ok thanks
0
Yup, it doesn't work because you output "beeb". Output "beep" or whatever it says. Read carefully
- 1
Error on the semantic, the correct is ' cout << i << endl; '
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
1 Votes
Тренажер кода
0 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes