Print out both arrays, with brief labelling so you can tell them apart on your output. Extend your code to produce a second array by using a for loop to iterate through your x_arr array and produce another array x_second_arr where each element in x_second_arr is 3 times the value in the array x_arr. The smallest value should go into a variable named xlow. Extend your code by writing a for loop to find the smallest value in the array. The largest value should go into a variable named xhigh. Extend your code by writing a for loop to find the largest value in the array. Make up your own data file for this problem. Then in a second loop, a for loop this time, print out all the elements which were input. Write a while loop to input a series of numbers (either from a file or from the keyboard, but using a file will make for easier debugging) into a one dimensional array of type double named x_arr, declared to be 25 elements in length. Read carefully each step as they are not only programming steps but also learning topics that explain how numeric arrays in C work. Exercise #1: Write a C program that contains the following steps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |