|
-
May 1st, 2010, 01:29 PM
#1
Help with writing a program to do this...
How to solve this? Any help would be appreciated :S
http://img684.imageshack.us/img684/5099/xxxxxxl.jpg
-
May 2nd, 2010, 01:29 AM
#2
Re: Help with writing a program to do this...
 Originally Posted by Anubis_F
This sound eerily similar to a standard homework assignment...
Since this is more to do with basic problem solving than it is programming, why don't you start off by telling us your approach to solving this. How would YOU solve this if it was an SAT or ACT question, and NOT related to programming?
-
May 2nd, 2010, 07:32 AM
#3
Re: Help with writing a program to do this...
-
May 2nd, 2010, 11:03 PM
#4
Re: Help with writing a program to do this...
Any help would be appreciated :S
Work hard, be good to your mother and maybe one day you will learn the value of doing your own homework.
-
May 3rd, 2010, 01:18 AM
#5
Re: Help with writing a program to do this...
 Originally Posted by Anubis_F
How to solve this? Any help would be appreciated
You can convince yourself that the number of cans in a soda-triangle of size N consists of the sum of the numbers from 1 to N like,
triangle(N) = 1 + 2 + 3 + ...... + N
And a soda-pyramide of size N consists of the sum of soda-triangles from size1 to N like
pyramide(N) = triangle(1) + triangle(2) + triangle(3) + ....... + triangle(N)
Pyramide(N) can easily be calculated using two nested loops both going from 1 to N.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|