anyone know c++

100 Dwarf Hunter
13065
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;
3
4 main() {
5


at the beginning and

11
12 }

at the end
Reply Quote
90 Gnome Priest
11895
You're missing a semi-colon after the
int x
Reply Quote
100 Dwarf Hunter
13065
and i feel dumb now. thanks
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)

Reported!

[Close]