0

Can somebody tell me why this code doesn't work?

#include <iostream> using namespace std; int main() { int n; cout<<"put n: "; cin>>n; for(int i=1;i<=n;i++){ cout>>"hi"; } return 0; }

24th Mar 2020, 2:29 AM
Oscar RamĂ­rez DĂ­az
Oscar RamĂ­rez DĂ­az - avatar
2 Answers
+ 5
Very very minor mistake. In for loop, that cout statement, after that, this << operator is expected not >> Replace line 9 by cout<<"hi";
24th Mar 2020, 2:41 AM
ツSampriya😘ツ
ツSampriya😘ツ - avatar
0
Thanks! Better give more attention to dettail next time i guess.
24th Mar 2020, 7:19 PM
Oscar RamĂ­rez DĂ­az
Oscar RamĂ­rez DĂ­az - avatar