1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Pascal triangle

Discussion in 'C' started by hoda, Feb 28, 2009.

  1. hoda

    hoda New Member

    somebody help me!! i didnt understand C++ completely and now i have to give my homework to the teacher.I need the answers for emergency.please help me to answer these questions:
    1-make a program that take one number and print this picture in the middle of the page:
    for example :4 *
    * *
    * * *
    * * * *
    first star should be printed in the forteenth column.
    2-make a program that unscramble the accepted number. for example :16482:12468
  2. hoda

    hoda New Member

    Re: C++ Tutorial I

    * *
    * * *
    * * * *
  3. shabbir

    shabbir Administrator Staff Member

    hoda, please do not jump into any article with your homework help and try creating a new thread for your query with proper explanation of what you have tried and where you are stuck.
  4. xpi0t0s

    xpi0t0s Mentor

    We don't do homework, sorry. We'll help you learn though.
    How far have you got with your programs?
    Can you see what needs doing in terms of what loop(s) may be needed?

    It's useful to break it down into easier tasks; that's how I solve complicated problems. So for example I might start with a program that just displays 5 asterisks in a line (using a loop, not cheating with a single printf). Then I might adjust that to print any number of asterisks in a line.
    Then you need to modify it to print multiple lines up to a fixed number.
    Then it's just a case of getting that number from the user.

    For 2 that's just a simple sort routine.

    You'll probably have everything you need in the course notes you've got so far. Relax, don't panic, and let us know where you get stuck.
    shabbir likes this.
  5. hoda

    hoda New Member

    thanks for your guidance

Share This Page