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

Write a MPIS program that takes an array (input from user and can be arbitrary s

ID: 3673427 • Letter: W

Question

Write a MPIS program that takes an array (input from user and can be arbitrary size). It returns the sorted array using bubble sort, and print out the median, the number of positive integers, negative integers, and zeros in an array of integers. The last element of the array should have the value 0xF, which is not used for the calculations and not counted for the size. Display those numbers with appropriate message on the console output. For example, assume an array as follows: (Array1: .word 12, 2, -4, 16, 5, -20, 0, 10, 0xF)

Explanation / Answer

/* * C program to sort N numbers in ascending order using Bubble sort * and print both the given and the sorted array */ #include #define MAXSIZE 10 void main() { int array[MAXSIZE]; int i, j, num, temp; printf("Enter the value of num "); scanf("%d", &num); printf("Enter the elements one by one "); for (i = 0; i
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