there's a problem on Codeforces.com (it's for beginers) which i know it's solution
but my code can't be accepted because there's a condition that i don't know how to write in C++
here's the problem:
Michael has a problem in his first year of primary school. He can not write numbers.
So his teacher suggested that he write the numbers several times, under one condition: if the teacher says "7", then Ahmed will write this number 7 times.
Write a program that will help Ahmed in doing his task.
Input
The input consists of a single line containing one integer X (1 ≤ X ≤ 10).
Output
Print the number X, repeated X times. The numbers should be separated by one space.
[that's the part that i don't know how to write (1 ≤ X ≤ 10).]
and that's my code
#include <iostream>
using namespace std;
int main()
{
int x;
cin >> x;
for (int i=1;i<=x;i++)
cout << x ;
return 0;
}