Christmas trees

B

Bert

How can my response to this problem be better? The pot doesn't work
that well when you enter 25, 21, 17 and some others.

The problem:

CHRISTMAS TREES

The grade 5 class at the local primary school wants some Christmas
tree outlines to colour in for the break-up session. You have to
write a program which will ask for an odd number representing the size
of the tree, rejecting negative quantities and numbers greater than
sixty, and then draw a tree centrally placed on the printer page
similar to the one below.
*
* *
* *
* *
* *
* *
* *
Base Line---> ***************
*
*
*******
* *
* *
***

The base line of the tree will be made of as many asterisks (*) as the
number that was input, and lines above it will have each of the
outline asterisks move in one space, until the single * appears at the
top.

The pot in which the tree rests should be scaled to suit the tree
size.

Download MY source code from:

Click on treetest
 
B

Ben Bacarisse

Bert said:
How can my response to this problem be better? The pot doesn't work
that well when you enter 25, 21, 17 and some others.

The problem:

CHRISTMAS TREES

Are you going to go through all 33 problem from the Australian
Computer Competition Junior Sample Questions? This is the first and
the three-move knight's reach is the last. Have these been assigned
as your homework?
 
B

Barry Schwarz

How can my response to this problem be better? The pot doesn't work
that well when you enter 25, 21, 17 and some others.
snip problem description

Better than what? You didn't show what your response looks like. If
you haven't created one yet, then any working response you create
would be better.


Remove del for email
 
B

Bert

Are you going to go through all 33 problem from the Australian
Computer Competition Junior Sample Questions? This is the first and
the three-move knight's reach is the last. Have these been assigned
as your homework?

Why not? I'll be like the only one who'll maybe get one problem done
in the two hours in my school cos none of the electives ever focus on
programming.
I'm largely self-taught with 5 or 6 programming books in my shelf and
once in year asking one of my dad's friends for help or posting on
Google Groups. I have no tutor, see?
 
R

redraiment

How can my response to this problem be better? The pot doesn't work
that well when you enter 25, 21, 17 and some others.

The problem:

CHRISTMAS TREES

The grade 5 class at the local primary school wants some Christmas
tree outlines to colour in for the break-up session. You have to
write a program which will ask for an odd number representing the size
of the tree, rejecting negative quantities and numbers greater than
sixty, and then draw a tree centrally placed on the printer page
similar to the one below.
*
* *
* *
* *
* *
* *
* *
Base Line---> ***************
*
*
*******
* *
* *
***

The base line of the tree will be made of as many asterisks (*) as the
number that was input, and lines above it will have each of the
outline asterisks move in one space, until the single * appears at the
top.

The pot in which the tree rests should be scaled to suit the tree
size.

Download MY source code from:

Click on treetest

Where's your source code?
I can't see the link...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top