Write a program that asks the user to enter a character, a string, an integer, and a float value using function overloading. The user should be prompted for each data item in a separate function with the name getData and a reference parameter of the type item being read. Display the data entered twice, using a different function but each time named displayData, that have different parameter lists.
The following is a sample run of the program.
Enter a character: A
Enter a word: sunny
Enter a whole number: 125
Enter a number with decimal point: 50.25
You entered the following data:
Letter: A
String: sunny
Integer: 125
Float: 50.25
Your data displayed again:
Integer: 125
Float: 50.25
Letter: A
String: sunny
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-48479.pdf
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment