Re: Program help
From: David Hilsee (davidhilseenews_at_yahoo.com)
Date: 09/15/04
- Next message: John Harrison: "Re: Program help"
- Previous message: Josh: "Program help"
- In reply to: Josh: "Program help"
- Next in thread: John Harrison: "Re: Program help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Sep 2004 00:02:54 -0400
"Josh" <tool540@yahoo.com> wrote in message
news:3b2ebc2c.0409141950.20d807d4@posting.google.com...
> Howdy
> i am newb somewhat to programing and i was just for fun trying to
> compile a program that asks the user for an odd int less than 22 and
> then returns this
> *****************
> ******* *********
> ****** ********
> ***** *******
> etc. the first line reps. the number enterd by user
> but i am having trouble i can get the first line but am having trouble
> making the white space in the middle i am using a nested loop. Should
> i use arrays? Any help would help thanks
This sounds like homework. In any case, you should try to describe the
problem a little better.
You ask the user for an odd int less than 22. OK, but what are you trying
to do with it? I don't see much correlation between the number of stars or
the number of spaces and the number "22". I'm guessing that you meant to
write 22 stars on the first line but instead wrote 17?
I'm assuming that your example output's width was intended to be 22, so your
program somehow displays an "asterisk" grid with width 22 and an empty
diamond in the middle. Is that right? In that case, I recommend that you
post your attempt at solving the problem so others do not feel like they are
giving you the answer to your homework. Currently, it sounds like a problem
that could be solved with two (relatively simple) for loops.
-- David Hilsee
- Next message: John Harrison: "Re: Program help"
- Previous message: Josh: "Program help"
- In reply to: Josh: "Program help"
- Next in thread: John Harrison: "Re: Program help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|