Thread: Need Helpp

  1. #31
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    Quote Originally Posted by Kinshara View Post
    owh.. I get it... but it don't work if we input 8, the range is too much..
    but, it's alright.. Thanks!!!..
    if you don't mind, help me at my new thread.. lol,, sory if I make to much thread... T_T
    First of all i said that its not the complete solution it will not work for any number lol

    ok i m responding to you in another thread

  2. #32
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    This problem was a tough one to solve, given the constraints. I took them to mean not only no arrays, but no IO help from file, lists, and etc.

    Although I finally got it to handle 1-9 for input with proper "bouncing" output, I never got the inspiration for an easy way to do it. The program relies on "selection" (aka "magic numbers"), up and down the block.

    I would post the code, but I'm planning a well deserved bonfire for it, later in the week.

    Here's it's idea of a text-based bouncing asterisk, from a height of 8 rows:

    Code:
     Pick a height to start [1-9]: 8
    
    *
    _*___________*
    __*_________*_*_________*
    ___*_______*___*_______*_*_______*
    ____*_____*_____*_____*___*_____*_*_____*
    _____*___*_______*___*_____*___*___*___*_*___*
    ______*_*_________*_*_______*_*_____*_*___*_*_*_*
    _______*___________*_________*_______*_____*___*_**
    
    
    			     press enter when ready
    With underline char's marking the spaces. (I can count them sooo much easier.)
    Last edited by Adak; 10-30-2009 at 03:50 AM.

  3. #33
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    Quote Originally Posted by Adak View Post
    This problem was a tough one to solve, given the constraints. I took them to mean not only no arrays, but no IO help from file, lists, and etc.

    Code:
     Pick a height to start [1-9]: 8
    
    *
    _*___________*
    __*_________*_*_________*
    ___*_______*___*_______*_*_______*
    ____*_____*_____*_____*___*_____*_*_____*
    _____*___*_______*___*_____*___*___*___*_*___*
    ______*_*_________*_*_______*_*_____*_*___*_*_*_*
    _______*___________*_________*_______*_____*___*_**
    
    
    			     press enter when ready
    With underline char's marking the spaces. (I can count them sooo much easier.)
    Adak I also had a very tough time to hit the bulls eye here tough one dude

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Helpp Do Not Know Where To Start
    By sjcc in forum C Programming
    Replies: 6
    Last Post: 03-12-2009, 08:50 AM
  2. simple inheritance problem please help:P
    By miguel811 in forum C++ Programming
    Replies: 9
    Last Post: 02-19-2009, 02:55 AM
  3. C++ helpp
    By nooneelse in forum C++ Programming
    Replies: 6
    Last Post: 09-13-2008, 05:55 PM
  4. helpp c programming assignment :(
    By robdiddy in forum C Programming
    Replies: 2
    Last Post: 04-27-2006, 07:15 AM
  5. helpp
    By Scarvenger in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2005, 06:57 PM