+ 2

It doesn't accept my code even though it matches

#include <iostream> using namespace std; int main() { //modify given statement cout << "Roses are red \nViolets are blue \nI love C++ \nAnd you will like it too!" << endl; return 0; } Basically, or need to output: Roses are red Violets are blue I look be coding And you will too

21st Nov 2020, 3:19 PM
Alex Mih
Alex Mih - avatar
11 Respuestas
+ 12
Check for spelling errors and blank spaces
21st Nov 2020, 3:21 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 5
Alex Mih , you wrote "I love C++", instead of "I look be coding".
21st Nov 2020, 3:25 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
; is missing
22nd Nov 2020, 11:29 AM
Ahmad Younis
Ahmad Younis - avatar
+ 1
It's in the code coach part of the c++ course it doesn't give any information other than the fact that it is wrong
21st Nov 2020, 4:11 PM
Alex Mih
Alex Mih - avatar
+ 1
BeegCat thank you. I found the lesson here: https://www.sololearn.com/learn/CPlusPlus/1604/
21st Nov 2020, 4:42 PM
Brian
Brian - avatar
+ 1
#include <iostream> using namespace std; int main() { //modify given statement cout << "Roses are red\n Violets are blue\n I love C++\n And you will like it too!" << endl; return 0; } Alex Mih Use the above. It's only testing how you can use the newline character "\n". The space should be after the new line character and not before. Check the difference between our codes.
22nd Nov 2020, 11:11 AM
Daniel Tobi Nyorere
Daniel Tobi Nyorere - avatar
+ 1
I didn't get any issues
22nd Nov 2020, 6:52 PM
Boudhik Shaj
Boudhik Shaj - avatar
0
Thanks but the code still looks correct. I'll take the lesson again
21st Nov 2020, 3:27 PM
Alex Mih
Alex Mih - avatar
0
I copied and pasted the code into the SoloLearn Coding Playground and it ran without error. Are you running it in the C++ playground, not under some other language? What error are you getting?
21st Nov 2020, 3:51 PM
Brian
Brian - avatar
0
What test cases
21st Nov 2020, 4:20 PM
Alex Mih
Alex Mih - avatar
23rd Nov 2020, 3:58 AM
Davide
Davide - avatar