Re: help plz
- From: ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx (Roger Stafford)
- Date: Wed, 15 Mar 2006 17:21:09 GMT
In article
<13701002.1142436257273.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>, Jabran
Zahid <jabranzahid@xxxxxxxxx> wrote:
hisnooker table.
i m writing a code for the number of red balls in a triangle on a
calculate it as 5+4+3+2+1 = 15
The program should work as follows:
user will input the depth of triangle e.g 5 so the program should
or depth = 4 then 4+3+2+1 = 10 and so on....-----------------
can anyone plz help me in writing this program ?
thaNKS
There is a story told about the famous mathematician, Carl Friedrich
Gauss, when he was ten years old. His school instructor gave his class
the problem of adding up all the numbers from 1 to 100 to keep them busy
for a while. Instead of doing all the hard work of adding these numbers,
little Gauss thought of how he could conceptually reverse the order of the
last 50 and place them under the first 50:
1 + 2 + 3 + ... + 50 +
100 + 99 + 98 + ... + 51
so as to get 50 pairs, each with a sum of 101, so he had only to multiply
50 x 101 to get 5050.
(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford
.
- References:
- help plz
- From: Jabran Zahid
- help plz
- Prev by Date: FMINCON yields INCREASING values of the objective function
- Next by Date: Re: please help, convolution/correlation mix up!!
- Previous by thread: help plz
- Next by thread: Re: help plz
- Index(es):
Relevant Pages
|