Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ To solve this problem your program must perform the following tasks: Declare a variable named user name that holds text. Declare variables named length
C++
To solve this problem your program must perform the following tasks: Declare a variable named user name that holds text. Declare variables named length feet and length yards that hold single precision real numbers. Prompt the user to enter his her first name. Get the name and store it in the corresponding variable. Prompt the user to enter the length in feet. Get the length from the keyboard and store it in the corresponding variable. Calculate the length in yards using the formula exactly as provided above and assign the result to he corresponding variable. Display on the screen the following message: "Hi,"user_name length feet. "feet are equal to ", length yards." yards" Problem: You are asked to write a program to receive a length expressed in feet, convert it to yards, and show the result on the screen. The formula for converting a length expressed in feet to yards is: lengh in yards = 1/3 x length in feet Your solution must ask the user to enter the length in feet at the keyboard and then calculate and display the resulting length in yards. You must ask for and display the first name of the person using your program tooStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started