SRL Archive - NOTA

POINTLESS procedures...


All that is man

2009-08-03 00:03:57

Ok i'm bored >.<


{*******************************************************************************
procedure: SquareItNumberRange(NumberRangeLow, NumberRangeHigh: intger);
By: All that is man
Description: Squares all the numbers from the first parameter to the second. POINTLESS I know...
*******************************************************************************}
procedure SquareItNumberRange(NumberRangelow, NumberRangeHigh: integer);
var i: integer;
begin
for i := NumberRangelow to NumberRangehigh do Writeln(IntToStr(i) + ' squared is equal to ' + IntToStr(i * i) + '.');
end;
{*******************************************************************************
procedure: SquareIt(number: intger);
By: All that is man
Description: Squares the parameter... POINTLESS I know.. returns the squared number
*******************************************************************************}
function SquareIt(number: integer): integer;
begin
result := (number * number);
Writeln((IntToStr(number)) + ' squared is equal to ' + IntToStr(number * number) + '.');
end;
{*******************************************************************************
procedure: CubeItNumberRange(NumberRangeLow, NumberRangeHigh: intger);
By: All that is man
Description: Cubes all the numbers from the first parameter to the second. POINTLESS I know...
*******************************************************************************}
procedure CubeItNumberRange(NumberRangelow, NumberRangeHigh: integer);
var i: integer;
begin
for i := NumberRangelow to NumberRangehigh do Writeln(IntToStr(i) + ' cubed is equal to ' + IntToStr(i * i * i) + '.');
end;
{*******************************************************************************
procedure: CubeIt(number: intger);
By: All that is man
Description: Cubes the parameter... POINTLESS I know... returns the squared number
*******************************************************************************}
function CubeIt(number: integer): integer;
begin
result := (number * number * number);
Writeln((IntToStr(number)) + ' cubed is equal to ' + IntToStr(number * number * number) + '.');
end;

Rubix

2009-08-03 02:10:06

Mathz functions?

All that is man

2009-08-03 02:27:08

From: Rubix
Mathz functions?


Yes boredem mathz functions :P

anonymity

2009-08-03 03:51:14

You maked me laugh… talenty.. and nerdy… nice the best of both worlds… out of random curiosity… what math classes have you are been taking?

All that is man

2009-08-03 06:16:30

From: anonymity
You maked me laugh… talenty.. and nerdy… nice the best of both worlds… out of random curiosity… what math classes have you are been taking?


Err i'm going into highschool this year in like 18 days >.< but i took honors alegbra in 8th grade and "perfect squares" tests every friday, so I was thinking of math class and made this >.< dun make fun of me

EDIT: In my freshmen year of highschool i'm taking honors geometary(how ever the hell you spell i <3 math not english :P)

ZaSz

2009-08-03 07:19:23

I taking geometry wtf. going into 9th… (maybe, i could be 19 (for the governement who checks my background))

What state you live in. If you live in states?

Method

2009-08-03 08:06:02

From: ZaSz
I taking geometry wtf. going into 9th… (maybe, i could be 19 (for the governement who checks my background))

What state you live in. If you live in states?


From: His profile
Location: Illinois


That should answer your question.

ZaSz

2009-08-03 08:09:26

Oh, :( dunno him

anonymity

2009-08-03 09:37:40

I know you were just proceduring squares and whatnot… but usually people don't play with math unless they really like it.. keep up the honors classes… they kick your butt… however they will help you in the long run…

All that is man

2009-08-03 19:48:35

From: ZaSz
I taking geometry wtf. going into 9th… (maybe, i could be 19 (for the governement who checks my background))

What state you live in. If you live in states?


Lol yeah my "location" should anwser that and Method :P

From: anonymity
I know you were just proceduring squares and whatnot… but usually people don't play with math unless they really like it.. keep up the honors classes… they kick your butt… however they will help you in the long run…


Thanks, I will!

ShowerThoughts

2009-08-03 21:36:43

So
 procedure SquareItNumberRange(NumberRangelow, NumberRangeHigh: integer); 
Is some sort the opposite of factorial?

bloooblooo

2009-08-03 21:37:23

All that is man, if you're learning about squares, maybe try writing a function that figures out if a number is a perfect square :)

It's fun practice, and the most important part of learning math is applying it, so for that I applaud you.

Method

2009-08-03 21:41:13

From: Hermen
So
 procedure SquareItNumberRange(NumberRangelow, NumberRangeHigh: integer); 
Is some sort the opposite of factorial?


No, it just prints out a range of squared numbers.

ShowerThoughts

2009-08-03 21:42:15

Yes, but factorial goes from high to low.

Method

2009-08-03 21:46:53

The factorial function doesn't do any squaring anyways. 5! = 5 * 4 * 3 * 2 * 1

All that is man

2009-08-04 00:53:47

Thanks everyone lol I know there pointless and wouldn't ever be used for a runescape script

function EatFood: boolean;
begin
if(SquareIt(5) <> 25)then
begin
Writeln('5 squared isn''t 25!!!!! terminating');
TerminateScript;
end;
end;
^
|
|
Lol
but yeah I've memorized 1-30 squares because of math >.< but I was really bored haha