Question: Please write this program visual studio, C + + . Using areays and loops pleaseFor the program assigned below, submit the following: Copy of the
Please write this program visual studio, C Using areays and loops pleaseFor the program assigned below, submit the following:
Copy of the source code c files and screenshots of output saved as an electronic attachment to Homework Assignment located in Canvas under Assignments.
Create two arrays of doubles with elements each named miles and kilometers. Prompt the user to enter distance values in miles and store each into a corresponding element of miles.
Then, in a second loop convert the values for miles to kilometers and store the result into a corresponding element of the kilometers array. Use the formula below to convert the temperatures from miles to kilometers: HINT: Don't forget about integer division
In a third loop, print the two arrays in a table with labels in the first row. Include decimal places for your kilometers output.
Test your program with the following values:
Create a program that will start with two arrays, each with elements called origArray datatype int and newArraydatatype double Prompt the user to enter values for Max and Min datatype int to be used in a random number generator. Using a random number generator seeded with time, assign a random number between Min and Max to each element of origArray. Then determine the average of the values stored into origArray call it origAvg datatype double Print origAvg to the screen with decimal places.
Then, in a separate loop populate the elements of newArray with a number depending on the following conditions:
Conditions newarray value should be
If origArray element origAvg and origArray element is origArray element's value even
If origArray element origAvg Max Min and origArray element odd
origArray element origAvg origArray divided origAvg
one final loop, print a table with two columns: origArray and newArray the console screen. Use origArray and newArray labels for the top each column. newArray values should include decimal places.
NOTE: This should a total separate loops. Test your program with the following values:
Max Min
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
