PDA

View Full Version : From 1toN - What I call somebody's formula posted on wikiHow.



jjpcexpert
December 2nd, 2010, 11:13 PM
--------------------------------------------------------
WikiHow is in no way related to the Wikimedia
project (wikipedia guys) and is not responsible
for any hacking of this script.
--------------------------------------------------------
sosf means so on so forth.

To use the script, you must
sudo apt-get install bwbasic
or install "bwbasic" some other way unless using the bash version.

Attached is a program to calculate the result of adding all numbers from 1 to the number you specify.

eg.
Specify 10 = you get 55
Specify 100 = you get 5050
Specify 1000 = you get 500500
sosf.

Try it.

Bash version ready.
It's called 177266. Click the name of the file to download.
This one clears the screen to tell you the answer.
Just in case you want the byWater version, it's in a tape archive (gz-compressed) called 177218. Click that link to download it.

mkendall
December 3rd, 2010, 01:42 AM
From 1toN = N(N+1)/2

It's well known.

jjpcexpert
December 3rd, 2010, 11:35 AM
From 1toN = N(N+1)/2

It's well known.
I know.
You need to get the purpose of the document.

NovaAesa
December 3rd, 2010, 11:39 AM
Nice work! Keep programming and one day you will be a pro.

jjpcexpert
December 3rd, 2010, 12:52 PM
Nice work! Keep programming and one day you will be a pro.

This was only partially my work. The formula for example, was not mine, but thousands of people could work it out on their own (that is, one person alone could do so in a room with 999 other people doing the same thing alone from each other).

Done several shell scripts already. I've even made an Ubuntu Welcome Screen using Zenity. I can't find it now. I will have to make another one.

forrestcupp
December 3rd, 2010, 01:15 PM
Are you really only a 10 year old?

jjpcexpert
December 3rd, 2010, 05:46 PM
Nice work! Keep programming and one day you will be a pro.

This was only partially my work. The formula is well known, as mkendall rudely but rightly points out below.


From 1toN = N(N+1)/2

It's well known.

I know. I found it on wikiHow. I made it work for a shell script.


Are you really only a 10 year old?

I am. If that ain't enough, I was born in early 2000. It's now late 2010. I'm 10 1/2 you nutcr**ker. Note humorous use of asterisk.

Chronon
December 3rd, 2010, 06:00 PM
This was only partially my work. The formula is well known, as mkendall rudely but rightly points out below.

I found it helpful rather than rude.

forrestcupp
December 3rd, 2010, 07:31 PM
I am. If that ain't enough, I was born in early 2000. It's now late 2010. I'm 10 1/2 you nutcr**ker. Note humorous use of asterisk.

Well, even if you used someone else's formula without coming up with it on your own, you're doing pretty darned good for a 10 year old. Personal computers were pretty rare when I was 10 years old.

Barrucadu
December 3rd, 2010, 08:26 PM
Nice work, keep practicing.

/me feels slightly weird whenever he encounters someone born after 2000; the *millenium* after he was born.

lisati
December 3rd, 2010, 08:35 PM
Nice work, keep practicing.

/me feels slightly weird whenever he encounters someone born after 2000; the *millenium* after he was born.

Agreed: well done.

(And I sometimes experience a similar effect when I realize I've just encountered someone born in the 1980s, two decades after I was born.)