Computer Science Canada abc |
Author: | mercuryy [ Sat Mar 12, 2005 5:21 pm ] | ||
Post subject: | abc | ||
How can you output something like
using counted loop? * indicate space |
Author: | Cervantes [ Sat Mar 12, 2005 7:54 pm ] |
Post subject: | |
What have you got so far? What are your ideas? These problems are best for you to do. You don't learn if we give you the answer. But we can help you. So, on those lines, what are your ideas? |
Author: | mercuryy [ Sat Mar 12, 2005 8:04 pm ] | ||
Post subject: | |||
what i got is
but than i can't get it to "flip" to the other side. ![]() |
Author: | ssr [ Sat Mar 12, 2005 8:30 pm ] |
Post subject: | |
I thnk what my teacher did on this quesion is do one loop for teh "*" and one loop for letters... 8) |
Author: | mercuryy [ Sat Mar 12, 2005 8:39 pm ] | ||
Post subject: | |||
yeah. but i tried that too.
here is another way i tried. but the ouput is still on the "wrong" side. |
Author: | Token [ Sat Mar 12, 2005 8:40 pm ] | ||||
Post subject: | |||||
yah we had to do this one too, heres a hint to how i solved it
then
also look up length in the help file, hope this helps |
Author: | ssr [ Sat Mar 12, 2005 8:49 pm ] | ||
Post subject: | |||
mercuryy wrote: yeah. but i tried that too.
here is another way i tried. but the ouput is still on the "wrong" side. my fault didnt explain it well 2 separate loops, I will post my code later on eventually ... yes ... 8) |
Author: | mercuryy [ Mon Mar 14, 2005 9:02 pm ] |
Post subject: | |
so there are no other ways beside using the "length" function? |
Author: | Token [ Mon Mar 14, 2005 10:03 pm ] | ||
Post subject: | |||
i'm sure theres way more than that way, for example. maybe look at the chr and ord functions and think about doing a for statement somthing like
but really you need to look at the help file to understand that |
Author: | ssr [ Mon Mar 14, 2005 10:19 pm ] | ||
Post subject: | |||
lol ord and chr arent that hard
it basically get a char and convert it into a ACSII number also it gets a ACSII number and convert it into a char. *** I know u know how to do it token just saying its not hard ![]() |
Author: | Token [ Mon Mar 14, 2005 10:22 pm ] |
Post subject: | |
lol i know Sirui Song , i was just saying i didnt feel like explaining it t him so he'd have to look it up for himself ![]() ![]() |
Author: | ssr [ Mon Mar 14, 2005 10:26 pm ] |
Post subject: | |
lol, I knew I should spread my name all around the internet... ![]() |
Author: | Flikerator [ Tue Mar 15, 2005 1:56 pm ] | ||
Post subject: | |||
Is that what you want? I don't think it is but maybe use it to do what you want? |
Author: | Token [ Tue Mar 15, 2005 2:24 pm ] | ||
Post subject: | |||
Flickerator thats basically what i did, only the thing is u have to do it the oposite way, so that they form against an imaginary margin on the right side, this is how i did it
and you can change it to say ne thing u want, but it has to be backwards |
Author: | Flikerator [ Tue Mar 15, 2005 3:03 pm ] | ||
Post subject: | |||
Token wrote: Flickerator thats basically what i did, only the thing is u have to do it the oposite way, so that they form against an imaginary margin on the right side, this is how i did it
and you can change it to say ne thing u want, but it has to be backwards Well you could take the original word and just make it backwords. That way you could ask the person for a word and they could still do it ![]() |
Author: | Token [ Tue Mar 15, 2005 3:17 pm ] | ||
Post subject: | |||
yah you could, or you could even go one step further and get the input from the user and make that backwards. (i didnt feel like taking the variable and turning it around, it just takes up more space, but this isnt so bad... an extra 8 lines)
to make it work without the get, uncomment the 2nd line and comment the marked lines (5,6) |