Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 Write a program to measure the economy of countries by calculating their Growth Rate. If for a given period the GDP value

imageimageimageimage

Question 2 Write a program to measure the economy of countries by calculating their Growth Rate. If for a given period the GDP value at the beginning and subsequent year is known, calculate the Growth Rate (GR) of the country for each year, the Average Annual Growth Rate (AAGR) and the Compound Annual Growth Rate (CAGR). Also, measure the relative riskiness of the country's economy based on its standard deviation. The program should: Read the number of countries a Read the number of years n Use array of length a to store the following: o the name of the country o an array of GDP i.e., of length of years n o an array of GR values i.e., of length of years n For each country's GDP value and corresponding year, calculate the growth rate (GR) and its ranking. i.e.: = (EV-BV) BV (* Hint: Round the GR value to two decimal places) where: EV (Ending Value) = BV (Beginning Value) = < GDP Value of the previous year> = GR> 25 = Exceptional GR> 0 = Good GR = (BV)* where: - 1 where: EV = BV = < GDP Value of the beginning year> = 1 (2; - z)2 n - 1 X = x = < GR Value of each year> (* Hint: Round the GR, AAGR and CAGR to two decimal places and Stdev to three decimal places) Print the following for each country: the country name for a specific year, the GDP Value, Growth Rate and Ranking the average annual growth rate the compound annual growth rate the standard deviation At the end: Compare the standard deviation of each country to measure the economy volatility based on the minimum standard deviation with the following condition: > If minimum standard deviation < 25, then print; "The Country 's economy is most stable If minimum standard deviation > 25, then print; "The Country 's economy is least risky" (Example runs of the completed program are shown on the next page) Enter the number of countries: 3 Enter the number of years: 3 Enter the name of country 1: X Country X Enter the beginning GDP value: 160000000 Enter the end of year 1 GDP value: 170000000 Enter the end of year 2 GDP value: 189700000 Enter the end of year 3 GDP value: 191000000 Enter the name of country 2: Y Country Y Enter the beginning GDP value: 567800000 Enter the end of year 1 GDP value: 567800000 Enter the end of year 2 GDP value: 732100000 Enter the end of year 3 GDP value: 890101100 Enter the name of country 3: Z Country Z Enter the beginning GDP value: 410000000 Enter the end of year 1 GDP value: 452200000 Enter the end of year 2 GDP value: Enter the end of year 3 GDP value: Country X GDP Value | $170,000,000.00 | $189,700,000.00 | $191,000,000.00 | Year | 1 2 3 763020290 987376183 Growth Rate Average Annual Growth Rate: 6.17% Compound Annual Growth Rate: 6.08% Standard Deviation: 5.452 6.25% 11.59% 0.69% | Ranking Good Good Good Year | 1 2 3 Country Y GDP Value | Growth Rate $567,800,000.00 | $732,100,000.00 | $890,101,100.00 | Average Annual Growth Rate: 16.84% Compound Annual Growth Rate: 16.17% Standard Deviation: 15.040 Year | 1 2 3 Country Z GDP Value $452,200,000.00 $763,020,290.00 | | $987,376,183.00 0.00% 28.94% 21.58% Growth Rate Average Annual Growth Rate: 36.14% Compound Annual Growth Rate: 34.04% Standard Deviation: 29.799 10.29% 68.74% 29.40% The Country X's economy is most stable | Ranking Poor Exceptional Good | Ranking Good Exceptional Exceptional

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

Fundamentals Of Electric Circuits

Authors: Matthew Sadiku, Charles Alexander

3rd Edition

978-0073301150, 0073301159

More Books

Students also viewed these Algorithms questions