Question: 1) Write a program called FloatValue_LastNameFirstName.cpp that prompts for and reads a floating-point value. The program then prints the whole part on one line using

1) Write a program called FloatValue_LastNameFirstName.cpp that prompts for and reads a floating-point value. The program then prints the whole part on one line using casting if needed.

For example, if the program was given the input 23.45, its would output

Output

  • Please enter a floating-point value: 23.45
  • Whole number part is 23

2) Write a program called convert_LastNameFirstName.cpp that accepts a Fahrenheit temperature and outputs the equivalent Celsius temperature.

The equation for Converting a Fahrenheit temperature to Celsius is

Celsius = (5/9)(Fahrenheit - 32)

Output

Please enter Fahrenheit temperature: 45

45 degrees Fahrenheit is equal to 7.22222 degrees Celsius.

(round to 5-decimal places)

3) Write a program called string1_LastNameFirstName.cpp that prompts for word one and prompts for word two.Use cin to read in the words and print the length of each word and join the two words together with a space between the two words.

Output

Please enter word one : Hello

Please enter word two: World

Word one length is 5

Word two length is 5

The two words together are "Hello World"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!