- 2
For loop example
I need to do this with using for loops, enter a number: 4 1 22 333 4444 333 22 1 how can I do this?
6 Respostas
+ 7
Hint: use a pair of nested loops.
eg
for() {
for () {
//output here }
}
+ 4
1) Is this homework?
2) Have you tried it yourself?
3) What language should this be in (Java, Python, C++, etc.)?
+ 3
Or if you're using Python (or ruby, maybe? (I'm not sure)), remember you can multiply strings by integers to make them appear however many times.
+ 1
I am using c++. I saw that example while Im surfing on the internet. I tried to do it but I couldn't so I asked how can I do it.
+ 1
Thanks