Thread: Output Stars With for loop

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    9

    Output Stars With for loop

    Hay Guys ,

    i have an assignment

    i should make 2 programs with for loop

    to out put those Figure

    num.1

    *
    **
    ***
    ****
    *****
    ******
    *******
    ********

    num.2
    *
    **
    ***
    ****
    *****
    ******
    *******
    ********

    and Explan please

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    I remember that I had the same assignment in my school... What have you done so far? For each of them you need 2 for loops - one that iterates vertically and one that iterates horizontally. One depends on the other.
    Last edited by kmdv; 12-26-2010 at 11:11 AM.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    9
    Really !! , No One Can Solve That ? ? ?

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    Of course many can solve that. But what have you done so far?

  5. #5
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Magic-Man-fci View Post
    Hay Guys ,

    i have an assignment

    i should make 2 programs with for loop

    and Explan please
    well... I do not really know how to explain... but if YOU have an assignment where YOU should make something it means that YOU should DO something not just wait that somebody who does not have this assignment and should not write your program will do it just to take away from you the possibility to actually DO your assignment
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  6. #6
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by Magic-Man-fci View Post
    Really !! , No One Can Solve That ? ? ?
    I've already given you a clue so stop being insolent.

  7. #7
    The Dragon Reborn
    Join Date
    Nov 2009
    Location
    Dublin, Ireland
    Posts
    629
    Oh yes, I remember making a christmas tree with this..
    you need 3 for loops at least..
    hint: one is for a spaces (if there are no spaces, it won't work)
    You ended that sentence with a preposition...Bastard!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  2. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 03:29 PM
  3. Replies: 4
    Last Post: 11-30-2005, 04:44 PM
  4. Formatting output into even columns?
    By Uncle Rico in forum C Programming
    Replies: 2
    Last Post: 08-16-2005, 05:10 PM
  5. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM