Help please

I have to write a basic program that counts down in increments of 10 from 100 to 0. we are supposed to use for, if, else, and, or while loops. it will print off 100 and stop everytime. I've tried googling everything on all these types of loops and have rewritten it many different ways. I feel like the return to line part 13 is where I'm screwing up with this. But I'm extremely new to this any help on what to do here?


#include <iostream>
#include <stdio.h>

/*************************/
/* Joshua M. Spalding */
/* CECS 130-50 */
/* Assignment 3 */
/*************************/

int main() {
int x = 100;

printf("\n %d\n", x);
x = x-10;

while (x > 0 )
{return 13;}

while (x = 0)
{printf("\n 0 \nBlastoff!");}

return 0:}
1
2
3
for( int x = 100; x > 0; x -= 10 )
    std::cout << x << '\n';
std::cout << "Blast off!\n";
thanks the format confused me where you restated int x= 100 I wasn't understanding what to put there. Thanks
Topic archived. No new replies allowed.