Author Topic: I need a programmers help.  (Read 2068 times)

endlessdamage

  • *
  • Posts: 128
    • View Profile
I need a programmers help.
« on: 2010-10-24 01:58:35 »
I know that topic is not very detailed but I am in the middle of a brain fart and cannot think.

Well i feel dumb as a rock. I have been a programmer for a few years now, and my little brothers friend just started going to school to be a programmer this year. He is working with a program called Raptor to make flowcharts. He came to me for help with a problem involving loops and I cannot think of the most efficient way to do it for the death of me.

The problem states that you need to make a flowchart with Raptor for a program that prints out 'coupons' for each months rent. So there will be twelve coupons per apartment. There are 3 apartments per building, and there are two buildings.  So first he initialized his constants and set a counter, then he set up his first loop. Inside that first loop you use the 'call module' which brings up another flowchart which is a part of this same one. and does the same thing over. the first loop is set to run 2 times, once for each building. The second is set to run 3 times, one for each apartment. Inside that second loop, he needs to create another loop, so he uses the call module again. Then inside this third loop everything is set up right and works. The problem is that for every coupon you need to output the month on that coupon. At first I said okay, all you need to do is set up a counter and everytime it runs through the loop it adds one, and you set the months to show up depending on the number of ties the loop has run through. Which makes sense. Then he made a good point. You cant set a string to equal a number. Hm. This is where my brain fart began. For this last one should he just set up a sequence structure and output everything one after the other? Or should he set up a nested decision structure? I feel as though both of these ways work, but arent the most efficient way, which as we all know. Is the greatest common goal in the world. So how could he set up a loop to print out the correct month on the coupon if you cant compare a string to a number...? Not to sound like a d*ck but I almost hope I stump some other programmer on here so I dont feel like a complete retard for not being able to think of how... Thank you in advance for any help.
« Last Edit: 2010-10-24 02:00:08 by endlessdamage »