I'm making a program in rust has an output like this but I'm failed.
Enter String: Hi
How many copies of String you need: 3
3 Copies of Hi are HiHiHi
but my code gives me this
HI
HI
HI
while i < index {
println!("{}", text);
i += 1;
}