
-----------------------------------
mallardrocker
Tue Oct 30, 2007 8:46 am

Functions Help
-----------------------------------
Write the function that will get three integer values as parameters and return the minimum of the three values.  Write an appropriate main program to test your function.

Thats is a school question... i have no idea where to start :D 

please help

-----------------------------------
Nick
Tue Oct 30, 2007 10:12 am

RE:Functions Help
-----------------------------------
well a function will look something like this

[syntax="turing"]function foo():int
return 0
end funtion[syntax]

so where the code says return 0 will be where yoour lowest varible so if you have a b and c as varibles and c is lower than b and a it will be
[syntax="turing"]function foo():int
return c
end funtion[syntax]

-----------------------------------
Ultrahex
Tue Oct 30, 2007 10:41 am

Re: Functions Help
-----------------------------------
There is many tutorials that would help with this sort of thing on this website If Statements:
http://compsci.ca/v3/viewtopic.php?t=14656 by Cervantes
OR
http://compsci.ca/v3/kb.php?mode=article&k=9 by Ultrahex Functions and Procedures
http://compsci.ca/v3/viewtopic.php?t=14665 by Cervantes
