I have an error with my program that I don't understand to do with Loops

#include

int main() {

int i;
std::cout << "How much Big-Shaq would you like: ";
std::cin >> i;
int x = i + i;
int y = x - 1;

for (i > 0;) {
std::cout << i << " + " << i << " is " << x << " minus 1 thats " << y << “quick maths. \n\n”;
i–;
}
}

If you know you know, Anyway when I want to compile my program I get these 2 errors,

11:14: error: expected primary-expression before ‘)’ token
for (i > 0;) {
^

11:14: error: expected ‘;’ before ‘)’ token

I think I have written everything correctly, What did I do wrong? Also this my own project not a codecademy lesson just on codecademy on the review section of loops

Thanks!

Please see How do I format code in my posts? for posting in the future (or editing now if possible) as unformatted code can be very hard for others to read. Is your loop supposed to be a for loop or a while loop? At present you seem to mixing the two. As for the other error whilst you don’t need all three parts of the for loop syntax I believe it still expects two ;; regardless of whether you include any clauses/expressions.

I’m using a For loop only

Then I highly suggest recapping the syntax of a for loop as that leads to your errors.

don’t forget the #include <iostream> at the top
there have to be three things in the for loop declaration … (variable, condition, and what happens to the variable each time tou do the loop )
also, it should be i--, not i-
(although I’d put that in the declaration of the for loop as: for( i; i >0; i--) instead of having i--; inside the body of the loop)
You also pasted in the wrong kind of quotation marks for one of the strings.
You might want to move computations for x and y into the loop.

#include <iostream> int main() { int i = 5; std::cout << "How much Big-Shaq would you like: "; std::cin >> i; int x = i + i; int y = x - 1; for (i; i > 0;) { std::cout << i << " + " << i << " is " << x << " minus 1 thats " << y << "quick maths. \n\n"; i--; } }