Question: using c++ 1.12 (Average speed in kilometers) Assume a runner runs 24 miles in 1 hour, 40 minutes, and 35 seconds. Write a program that
1.12 (Average speed in kilometers) Assume a runner runs 24 miles in 1 hour, 40 minutes, and 35 seconds. Write a program that displays the average speed in kilometers per hour. (Note that 1 mile is 1.6 kilometers.) **2.6 (Sum the digits in an integer) Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932 , the sum of all its digits is 14. operator to remove the extracted digit. For instance, Hint: Use the operator to extract digits, and use the 932 % 10 = 2 and 932 / 10 = 93. Here is a sample run: Sample Run for Exercise02_06.cpp Enter input data for the program (Sample data provided below. You may modify it.) 435 Reset Show the Sample Output Using the Proceeding Input Execution Result command Exercise02_06 Enter a number between 0 and 1000: 435 The sum of the digits is 12 command>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
