Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EASY Task?
#6
Your for loop doesn't work because as soon as you do this
out s.left(s n) when n =0 s is now empty and any further attempts after will have no value
need to store the string in a new string
 
Code:
Copy      Help
str s = "repeatable stringrepeatable string"
int n
for n 0 s.len
,out _s.left(s n+1)


Messages In This Thread
EASY Task? - by beachballer - 01-29-2024, 04:38 PM
RE: EASY Task? - by Gintaras - 01-29-2024, 05:56 PM
RE: EASY Task? - by Rudeyz - 10-30-2024, 11:23 PM
RE: EASY Task? - by Gintaras - 10-31-2024, 04:03 AM
RE: EASY Task? - by Gintaras - 10-31-2024, 04:22 AM
RE: EASY Task? - by Kevin - 10-31-2024, 01:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)