Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write , compile, run, script, and compress (to tar.gz format) the, .cfiles, and scripts of 1 program in C language. The program must prompt

Please write , compile, run, script, and compress (to tar.gz format) the, .cfiles, and scripts of 1 program in C language. The program must prompt for manual entry of any number of elements followed by a prompt to manually enter each element for any numerical array of any size. return the array size, max, min, midpoint, count less than midpoint, count greater than midpoint, the midpoint linear search, the sum, the average, the median, the number of even elements, the number of odd elements, and the number of elements divisible by the min value. Here is some source code to help start: #include #define MAX_SIZE 100 // Maximum array size int main() { int arr[MAX_SIZE]; int i, max, min, size, midpoint; /* Input size of the array */ printf("Enter size of the array: "); scanf("%d", &size); /* Input array elements */ printf("Enter elements in the array: "); for(i=0; i max) { max = arr[i]; } /* If current element is smaller than min */ if(arr[i] < min) { min = arr[i]; } } /* Print maximum and minimum element */ printf("Maximum element = %d ", max); printf("Minimum element = %d", min); printf("midpoint element = %d", midpoint); return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions