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; }
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";
0
Thanks! Better give more attention to dettail next time i guess.