View the step-by-step solution to:

Design a module named getNumber which uses a reference parameter variable to accept an Integer argument.

Design a module named getNumber which uses a reference parameter variable to accept an Integer argument. The module should prompt the user to enter a number and then store the input in the reference parameter variable.
I'm having difficulty comprehending the concept of a reference variable.  I've written my module below, however I'm unsure if I'm correct. I respectfully request your review and suggestions.
Module main ()
//Declare and initialize variable
Declare Integer = 99
//Display the value in variable
Display "x is set to", x
//Pass variable to getNumber
Call getNumber (x)
//Display the values now
Display "Enter a number"
Input number
Display "x is set to", x
End Module
Module getNumber (Integer Ref value)
Set value = 0
End Module

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question