Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the code in C program and please refer to the input and output example below for what the program should look like. Write a

Write the code in C program and please refer to the input and output example below for what the program should look like.

Write a program that prompts the user to enter the population of ten provinces of Canada and stores them in an array called population of size 10. It then finds and prints the average population of all provinces in Canada. It also finds and displays the provinces with the highest and lowest population. Please follow the sample input / output for further clarification.

image text in transcribed

Sample Input: Enter the population of 10 provinces of Canada (in million): Province number 1: 4.6 Province number 2: 1.3 Province nimbe r 3:I.5 Province number 4: 9.4 Province number 5:5. 3 Province number 6: 13.6 Provincenumber 7: 1.5 Province number 8: 8.2 Province number 9: 1.1 Province number 10: 4.1 Output: Average PopuTatlon In Canada = 5.66 mlT Ion Province number 6 has the highest population Highest population- 13.60 million Province number 9 has the lowest population Lowest population = 1.10 million

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

Students also viewed these Databases questions