Output Stars With for loop

This is a discussion on Output Stars With for loop within the C++ Programming forums, part of the General Programming Boards category; Hay Guys , i have an assignment i should make 2 programs with for loop to out put those Figure ...

  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
    682
    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 10:11 AM.
    I never put signature, but I decided to make an exception.

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  6. #6
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    682
    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.
    I never put signature, but I decided to make an exception.

  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, 02:08 PM
  2. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 02:29 PM
  3. Replies: 4
    Last Post: 11-30-2005, 03: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, 04:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21