What's the meaning of 'stray' | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the meaning of 'stray'

It's what I had in this code.

11th Sep 2021, 12:04 PM
Mbengue Mbor
Mbengue Mbor - avatar
7 Answers
- 1
Mbengue Mbor i told about stray
11th Sep 2021, 12:14 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
When you copying code from any source then this error occuring . To remove this error you need to rewrite your code self
11th Sep 2021, 12:08 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Mbengue Mbor It's not an issue of copy code, it is an issue of \n because you used without double quotes (" ") \n should be inside double quotes (" ") Btw your program first should print number then "Beep" for example if input is 10 then output should be like this: 10 Beep 9 8 7 6 5 Beep 4 3 2 1 https://code.sololearn.com/cKW1Vb0RLQ4W/?ref=app
11th Sep 2021, 12:52 PM
A͢J
A͢J - avatar
+ 1
many thanks
11th Sep 2021, 12:56 PM
Mbengue Mbor
Mbengue Mbor - avatar
0
#include <iostream> using namespace std; int main() { int n; cin >> n; //your code goes here for(int i = n; i >= 1; i--){ if(i % 5 == 0){ cout << "Beep"\n; }else{ cout << i\n; } } return 0; }
11th Sep 2021, 12:06 PM
Mbengue Mbor
Mbengue Mbor - avatar
0
It's mine I copy it from the course
11th Sep 2021, 12:10 PM
Mbengue Mbor
Mbengue Mbor - avatar
0
Ok thanks
11th Sep 2021, 12:16 PM
Mbengue Mbor
Mbengue Mbor - avatar