Lost with Looping

I'm trying to create a program that loops "x" number of times, where "x" is going to be a user-input number.

I've seen many tutorials, but none are able to help me with this. Does anyone know how I would code such a thing?
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

int main()
{
    int number; //*variable to store the user input

    std::cin >> number; //*reads user input

    for (int x = 0; x < number; x++) //*begins on zero, repeats while x is less than the desired number

          {
                //* your program code here
          }


     return 0; //*ends your program
}
Thank youuu. :) I've got the whole program done, my buddy just wanted that bit added in.
Topic archived. No new replies allowed.