Answer:
Explanation:
It is assumed that name and age have been declared suitably for storing names and ages. so the following is the code to read in a name and age and printout the message "the age of name is age. "
cin >> Name;
cin >> Age;
cout << "The age of " << Name << " is " << Age << ".";
Answer:
a. True
Explanation:
The fractional_part function divides the numerator by the denominator, and in turn returns just the fractional part, which is usually a number between 0 and 1.
When the denominator is 0, it produces an error result, instead of attempting the division, the function can be programmed to return "Math Error: cannot be divided by zero", as shown in the following Python code;
def fractional_part(numerator, denominator):
if denominator == 0:
return "Math Error: cannot be divided by zero"
return (numerator % denominator)/denominator
August 10, 1932 in Billund, Denmark