How do I go about writing a user-defined function named Get_Inputs that when called, the function will prompt for three integers and send these numbers to its calling environment.
Jboy05
0
Junior Poster
Recommended Answers
Jump to PostWhat do you know about functions? If you want to return 3 variables you'll probably need an array of ints. Or you could pass 3 ints by reference.
Jump to PostGood start. You got the reference arguments right.
First, function needs a return type in its definition, even if it returns nothing. Place the keyword "void" in front of the function name.
Your input statement is wrong on two counts. You have the arrows pointing wrong way (think …
All 6 Replies
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
Jboy05
0
Junior Poster
Jboy05
0
Junior Poster
vmanes
1,165
Posting Virtuoso
VernonDozier
2,218
Posting Expert
Featured Poster
Jboy05
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.