Question: ) Matrix of velocities : Write a C++ program to convert velocities to alternate units as described below: Use a single 2D array with 3
) Matrix of velocities: Write a C++ program to convert velocities to alternate units as described below:
Use a single 2D array with 3 columns and 21 rows for the velocity values as follows:
column 0 velocity in mi/h (mph)
column 1 velocity in km/h
column 2 velocity in ft/s
The 3D array is illustrated below where velocity varies from 0 100 mi/h:
| 0 |
|
|
| 5 |
|
|
| 10 |
|
|
| 15 |
|
|
| 20 |
|
|
| 25 |
|
|
| 30 |
|
|
| 35 |
|
|
| 40 |
|
|
| 45 |
|
|
| 50 |
|
|
| 55 |
|
|
| 60 |
|
|
| 65 |
|
|
| 70 |
|
|
| 75 |
|
|
| 80 |
|
|
| 85 |
|
|
| 90 |
|
|
| 95 |
|
|
| 100 |
|
|
Use a loop or a list to assign the velocity values to column 0.
Use a loop to calculate and assign the velocities in columns 1 and 2.
Neatly display the velocity in three columns with a table heading.Select a reasonable number of digits for each column.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
