Usetutoringspotscode to get 8% OFF on your first order!

  • time icon24/7 online - support@tutoringspots.com
  • phone icon1-316-444-1378 or 44-141-628-6690
  • login iconLogin

simple code

Write an interactive program to perform the following tasks in order:
a) Ask user to input an array size that is an integer value ranging from 10 to 20, inclusively
b) Check the validity of user input and ask the user to input again if previous value was invalid
c) Echo users valid input value on the screen
d) Assign array elements with random values (integer ranging from 0 to 100, inclusively)
e) Display array elements in their original order
f) Sort array elements from maximum to minimum
g) Display array elements in sorted order
h) Compute and display the median value of array elements
i) Compute and display the mean value of array elements
j) Compute and display the variance value of array elements
Your program needs to meet the following requirements:
Array elements are assigned with random values that do not repeat among executions
Array sorting is done in a sub-function
Computing median value is done in a sub-function
Computing mean value is done in a sub-function
Computing variance value is done in a sub-function

Note: as a common practice to check input validity when using scanf(), add a while loop right
after a call to scanf() to consume un-read characters (including the newline character n) in
the input buffer. See the following example for usage.

write it all in C language!

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes