Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve using C# NOTE: Assignment 4 should utilize only the following topics: Variables, Assignment, Input/Output, Selection Structures and repetition structures (i.e. loops). Program 3: National

Solve using C# NOTE: Assignment 4 should utilize only the following topics: Variables, Assignment, Input/Output, Selection Structures and repetition structures (i.e. loops).

Program 3: National Debt. One thing that should worry anyone is financial debt. If youre like most others, you have credit card debt, student loans and so on. Our nation has similar debts, including debt to its citizens (e.g. bonds), debt to social programs, and debt to other nations. If youd like to see where we stand, check out https://www.usdebtclock.org/. If youd like to see how we compare to other nations, check out the World Debt Clocks in the upper-left corner. How do these debt clocks work? Its exceptionally complicated, but a lot of national debt comes from issuing Treasure Notes (e.g a 10-year Treasury Note) that currently yield 3.6% interest. Your task is to write a program that prompts the user for a national debt (expressed in billions of dollars), the interest rate, and calculate how much debt is generated per year (assuming no debt is paid off by the GDP) over a 10-year period. For example, if a country currently has 1,000 billion (i.e. a trillion) dollars of debt, it will generate 36 billion dollars of additional debt in a year. The next year, the debt of 1036 billion would generate 37.296 billion additional dollars of debt, totaling 1073.296 dollars of debt. Sample run 1: Enter the starting debt in billions: $1000 Enter the interest rate: 3.6 ***** Year 1 ***** Debt generated this year is $36.0 Accumulated debt from interest is now $36.0 Total debt is now $1036.0 billion dollars ***** Year 2 ***** Debt generated this year is $37.295998 Accumulated debt from interest is now $73.296 Total debt is now $1073.296 billion dollars ***** Year 3 ***** Debt generated this year is $38.638657 Accumulated debt from interest is now $111.934654 Total debt is now $1111.9347 billion dollars ***** Year 4 ***** Debt generated this year is $40.029648 Accumulated debt from interest is now $151.9643 Total debt is now $1151.9644 billion dollars ***** Year 5 ***** Debt generated this year is $41.470715 Accumulated debt from interest is now $193.43501 Total debt is now $1193.435 billion dollars ***** Year 6 ***** Debt generated this year is $42.96366 Accumulated debt from interest is now $236.39868 Total debt is now $1236.3987 billion dollars ***** Year 7 ***** Debt generated this year is $44.51035 Accumulated debt from interest is now $280.90903 Total debt is now $1280.909 billion dollars ***** Year 8 ***** Debt generated this year is $46.112724 Accumulated debt from interest is now $327.02176 Total debt is now $1327.0217 billion dollars ***** Year 9 ***** Debt generated this year is $47.77278 Accumulated debt from interest is now $374.79456 Total debt is now $1374.7946 billion dollars ***** Year 10 ***** Debt generated this year is $49.492603 Accumulated debt from interest is now $424.28717 Total debt is now $1424.2871 billion dollars

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions