Author |
Message |
TheDarkArcher
|
Posted: Thu Nov 20, 2003 3:29 pm Post subject: Can anyone help me with this functions question! |
|
|
Here is the question:
1. Write and test a function subprogram called circleArea whose value is to be the area of a circle whose radius is given as the parameter of the function. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mazer
|
Posted: Thu Nov 20, 2003 4:27 pm Post subject: (No subject) |
|
|
i'm going to pretend you aren't just expecting someone to write the program for you, and politely point out that in order for me to help you, i need to know what your problem is. |
|
|
|
|
|
poly
|
Posted: Thu Nov 20, 2003 4:56 pm Post subject: (No subject) |
|
|
lately a lot of people have been asking for others to do something for them cause they don't know how. Does no one take the time to ask the teacher for help cause than atleast they will know you tried and put your effort into something (even if it doesnt work) |
|
|
|
|
|
Thuged_Out_G
|
Posted: Thu Nov 20, 2003 5:04 pm Post subject: (No subject) |
|
|
code: |
function circleArea (radius : real) : real
result 3.14159*(radius)**2
end circleArea
var rad : real
put "Please enter in the radius: " ..
get rad
put "The area of the circle is: ", circleArea (rad)
|
im not positive on the formula for it, but i think i got it right its Prsquared is it not?
if the above formula isnt right, just change the result line
im pretty sure its either 3.14159 * radius * radius or the one i used above [/code] |
|
|
|
|
|
Blade
|
Posted: Thu Nov 20, 2003 5:54 pm Post subject: (No subject) |
|
|
wow, seems like Thuged_Out_G is doing everyone's work.... |
|
|
|
|
|
santabruzer
|
Posted: Thu Nov 20, 2003 6:35 pm Post subject: (No subject) |
|
|
I guess it's good to have him on this CompSci team (even though i ain't on it).....
|
|
|
|
|
|
Thuged_Out_G
|
Posted: Thu Nov 20, 2003 6:37 pm Post subject: (No subject) |
|
|
Blade wrote: wow, seems like Thuged_Out_G is doing everyone's work....
people have helped me with mine, so i am returning the favour
|
|
|
|
|
|
Mazer
|
Posted: Thu Nov 20, 2003 6:59 pm Post subject: (No subject) |
|
|
that's fine, but there's a difference between helping someone with work and doing it for them (which is fine as long as they pay you for it). i wonder if TheDarkArcher will thank you for this or just take the code and never come back until he has another problem... |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Thuged_Out_G
|
Posted: Thu Nov 20, 2003 8:49 pm Post subject: (No subject) |
|
|
lol, if it was hard to write id be pissed if he did that...but this took like a minute lmao |
|
|
|
|
|
Blade
|
Posted: Fri Nov 21, 2003 2:54 pm Post subject: (No subject) |
|
|
Thuged_Out_G wrote: lol, if it was hard to write id be pissed if he did that...but this took like a minute lmao
the point is by doing their work they aren't learning anything and in turn not getting any better.... thats why compsci.ca is here, to help, not to do their work
i'm not trying to offend you or anything, i'm just trying to point out why doing people's work is bad and wrong |
|
|
|
|
|
Andy
|
Posted: Fri Nov 21, 2003 6:53 pm Post subject: (No subject) |
|
|
whats with all these noob programmers on here who contributes nothing and asks other to do thier frigging hw? |
|
|
|
|
|
|