Question: computer programming This is the code from last week: //parallelArrayLastNameFirstInitial.cpp #include #include #include #include using namespace std; //function prototypes void loadArrays(int time[],int speed[]); void calculateDist(int
computer programming
This is the code from last week:
//parallelArrayLastNameFirstInitial.cpp #include
//create parallel array int time[SIZE]; int speed[SIZE]; int distance[SIZE];
//call functions, loadArrays loadArrays(time,speed); //call functions, calculateDist calculateDist(time, speed, distance); //call functions, print print(time, speed, distance);
system("pause"); return 0; }
/*Function loadArrays that generates random values for time and speed arrays*/ void loadArrays(int time[],int speed[]) { for(int i=0;i /*Function calculateDist that generates distance array from time and speed values*/ void calculateDist(int time[], int speed[], int distance[]) { for(int i=0;i /* The function, print that takes time, speed, and distance arrays and prints the time, speed, and distance. */ void print(int time[], int speed[], int distance[]) { cout CSC 292 - UNIX and C Programming Convert a CH Program to a C Program Goal: This programming converts a CH program into a C program with specified output format. Modify the program from "C++ program" you did last week and save it as paralleArrayFirstInitLastName.c (Note: the file extension must be "e"). The output will be close to the following screen shot: EAM HNSUCourse hemele preference Travel Chart for Data Set of 5 Author: May Hou Number Time(hours) Speed (mph) Distance (miles) X #1. #2 #3 56 68 64 70 52 224 284 384 35e 312 #4. WS Process exited after @.0526 seconds with return value @ Press any key to continue In this program, all functions that pass one or more arrays must pass the array size along. Points will be deducted if the array size is not in the parameter list. Instructions: Source code implementations required for submission must include comments (name, date, course, assignment, instructor and description of program and meaningful variables.) Use proper prompts and labels for all output. Source code must compile and produce correct code to get full credit. If code does not compile, 0 points will be given. Copy and paste at least 2 sets of test result at the end of the source code. Submit source code as parallel ArrayLast NameFirstInitial.e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
