Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C program that declares 2 double arrays called numbers1 and numbers2 bot

ID: 3651923 • Letter: W

Question

Write a C program that declares 2 double arrays called numbers1 and numbers2 both of size 100. Get numbers from the user until the user enters a negative number and save the numbers in array numbers1. Then in the main do the following:
1) Call function printArray to print the numbers1 10 elements per line.
2) Get a number from the user (data-type) double which is stored in a double variable called target. Get another number from the user (data-type) double which is stored in another double variable called difference.
3) Call the function linearSearch to do a linear search to determine if there is a number X in numbers1 such that . If there is such a number, return the first encountered Xs position.
4) In the main function, print whether the number X exists in numbers1. And if X is found, print its value and location in the numbers1.
5) Call function copyArray that will copy array numbers1 to array numbers2 in a reversed order.
6) Call function printArray to print znumbers2 10 elements per line.
void printArray(double arr[], int size)
int linearSearch(double arr[], int size, double target, double difference)
void copyArray(double destination[]. Double source [], int size)

Explanation / Answer

//difference wasnt used since i couldnt figure out what to do with it #include void printArray(double arr[],int size){ int j; for(j=0;j
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote