Write a function showThem that receives two parameters: a char parameter ch and a float parameter f. The function displays these values. Call the function from main using last two digits of your enrollment as literals.
Note: We are authorized to answer one question at a time, since you have not mentioned which question you are looking for, so we are answering the first one, please repost your question separately for the remaining question.
Note: In this question, the coding language is not specified then we are doing this question in the CPP language.
Note: In this question, the Registration number is required, but the registration number is not given in the question then we are assuming the registration number.
CPP program:
//including essential header file
#include <iostream>
//using standard namespace
using namespace std;
//function to display value receives in Parameter
int showThem( char ch, float f )
{
//display the character value
cout << "Character value is: " << ch << endl;
//display the floating value
cout << "Floating value is: " << f << endl;
}
//main function
int main()
{
//call the function using the last two digit of the registration number as literal value
//assuming registration number is 12345678
//last two digit of the registration number is 78
showThem( 78, 78 );
}
Step by step
Solved in 2 steps with 1 images