anyone know c++

Games, Gaming and Hardware
so i have this rather annoyingly stubborn online c++ class i have to take and the website we have to use for homework is terrible, and i am having trouble with this problem
"Write a for loop that prints the odd integers 11 through 121 inclusive, separated by spaces. "

what i have so far is
int x

for (x = 11; x <= 121; x += 2)

cout << x << " ";

and the error that comes up is "you seem to have an error in compilation"

they already have some code already put in

#include <iostream>
2 using namespace std;
4 main() {

at the beginning and

12 }

at the end
You're missing a semi-colon after the
int x
and i feel dumb now. thanks

Join the Conversation

Return to Forum