Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
Integer Parameters
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Jvzj017
New Member
Join Date:
Oct 2006
Posts:
10
#1
Integer Parameters
Oct 11 '06, 03:26 AM
Write the definition of a function min that has two int parameters and returns the smaller.
dariophoenix
New Member
Join Date:
Oct 2006
Posts:
34
#2
Oct 11 '06, 03:41 AM
Originally posted by
Jvzj017
Write the definition of a function min that has two int parameters and returns the smaller.
Hey, try and do them yourself... How else are you gonna learn?...=)
int min(int a, int b){
if (a<=b) return a;
else return b;
}
Bye, I'm going to sleep...
Comment
Post
Cancel
dynamicleo
New Member
Join Date:
Oct 2006
Posts:
14
#3
Oct 12 '06, 07:48 AM
Code:
int min( int x, int y) { return x < y ? x : y; }
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment