Answer:
#include <iostream>
using namespace std;
void miles_to_km(float &miles)//function to convert miles to kilo meters.
{
miles=miles*1.6;
}
int main() {
float miles;
cout<<"Enter the miles"<<endl;
cin>>miles;//taking input of the miles..
miles_to_km(miles);//calling function that converts miles to km..
cout<<"The number of km is "<<miles<<endl;//printing the km.
return 0;
}
Output:-
Enter the miles
54
The number of km is 86.4
Explanation:
I have created a function miles_to_km of type void which has the argument miles passed by reference.In the function the variable miles is converted to kilo meters.Then in the main function the function is called with the value prompted from the user.Then printing the changed value.
Answer:
The answer is "Option a"
Explanation:
In Python, ord() function takes the length string 1 as a parameter and returns the representation of the passed argument for the Unicode point. For example, ord('Z') return value 90 that is a Unicode code value of character 'Z'. and other function is not correct that can be described as follows:
- In option b, Inside the ord function chr function is used that accepts only numeric value that' why it is not correct.
- In option c, Inside the chr function ord function is used that cover value in lower case that's why it is not correct.
- In option d, The chr function accepts only numeric value that's why this option is not correct.
If you're a zybooks user.
itemsOSS.print(userItem + " ");
userItem = itemCharStream.toString();