I need help with my code. When I tried running it they said I should input a primary statement before the return. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

I need help with my code. When I tried running it they said I should input a primary statement before the return.

#include <iostream> using namespace std; int main() { cout<<"C++ is cool">> return 0; }

15th Jul 2021, 3:57 AM
Mem~phis🌺
Mem~phis🌺 - avatar
6 ответов
+ 2
That's because instead of >> you should put ; Or <<endl;
15th Jul 2021, 4:06 AM
Martin Cervantes
Martin Cervantes - avatar
+ 2
statement in c++ is terminated by semi-colon (;) and not by ">>" So the correct code: #include <iostream> using namespace std; int main() { cout << "C++ is cool" << endl; return 0; } Please relearn your c++ course.
15th Jul 2021, 4:07 AM
Rohit
0
33
14th Mar 2022, 6:05 AM
Angel Antulio
0
Hi
25th Aug 2022, 1:29 AM
Narek Khachatryan
Narek Khachatryan - avatar
0
Hi
25th Aug 2022, 1:29 AM
Narek Khachatryan
Narek Khachatryan - avatar
- 2
Thanks
15th Jul 2021, 4:08 AM
Mem~phis🌺
Mem~phis🌺 - avatar