converting int to one single char

So far I got the program to output the integers but not the Xs...
If I pick 5 for example my program outputs 12345 instead of XXXXX

Can someone provide a hint on how to convert the number from 1 to 10 into the X char?

Thank you
Last edited on
You don't need to convert.

Output "X" instead of the value of the loop iteration.

loop(until n){
cout << "X";
}
Last edited on
I'll polish turbozedd's code.

1
2
3
4
for(int m = 0 ; m < n ; m++)
{
    cout << "X";
}


This works for any int value.
I was trying to give a pseudocode hint. Especially since it seems like andrewt already seems to have some kind of loop.
True, he did seem to have a loop of sorts. Unless...
Say, could you post that code for us, andrewt?
Topic archived. No new replies allowed.