This is a C++ program, you need to do this and take a screenshot of your coding.
One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an argument, and returns the number of inches in that many feet. Use the function in a program that prompts the user to enter a number of feet and then displays the number of inches in that many feet.
#include<iostream> using namespace std; int feetToInches(int feet){ return feet*12; } int main() { int feet; cout<<"Enter number of feet: "; cin>>feet; cout<<"Number of inches: "<<feetToInches(feet)<<endl; return 0; }
Get Answers For Free
Most questions answered within 1 hours.