Computer Science Canada No error message, and code does not fully compelet and ends |
Author: | aznrex [ Thu Nov 17, 2005 6:06 pm ] | ||
Post subject: | No error message, and code does not fully compelet and ends | ||
sry if it is a nooby question but i just started with turing. Can someone please help me see what is wrong with it? |
Author: | Flikerator [ Thu Nov 17, 2005 6:23 pm ] |
Post subject: | |
What is the point of the program? It doesnt work because there is only a slight chance that either one of those could be true. I entered a bunch and the only one that worked was 10 (Which was very close to pi I might add). |
Author: | aznrex [ Thu Nov 17, 2005 7:45 pm ] |
Post subject: | |
i am trying to write a program so that when given a number repersenting the number of equally shaped squares, can make a largest square possible with x amount of left over squares. i am repersenting "num2" as the root of "num" so that "num2"/"num" will equal to 1/num2 if the number given was a a root with tn (term n) (also as n^n) ie t1 = 1^1 and t5= t^5. that equation will only come true if the given num have a perfect square (like 4,9,16) |
Author: | MysticVegeta [ Thu Nov 17, 2005 8:15 pm ] |
Post subject: | |
Let me guess. Pascal Contest. Problem #21. Part C? Am I right? |
Author: | aznrex [ Thu Nov 17, 2005 8:44 pm ] | ||
Post subject: | |||
No its not from pascal but here is my revised code
for some odd reason my ceil doesnt work, can someone please tell me why? |
Author: | MysticVegeta [ Thu Nov 17, 2005 10:44 pm ] | ||||
Post subject: | |||||
You need to do this-> Instead of putting
The r : real and : int are the parameters of the functions and the return values of that functions. It means that in order to call that you need to pass that type of variable in that function. so try this
|
Author: | aznrex [ Thu Nov 17, 2005 11:38 pm ] |
Post subject: | |
thanks alot, works now, the explanation that came with turing sucks =P the explanation u gave me made a heck lot more sense |