- #1
DoremiCSD
- 10
- 0
Homework Statement
The program should make should calculate the tax that corresponds to some income. The user gives
1. A natural number n is the length of the list at minus 2 and a length of 3 in the list below and equal to the number of rows in the table above non-header line and last line. In the above table the value of n is 7. We have 1 <= n <= 9.
Register as an integer :: n.
2. A list of real numbers corresponding to the first column of the table above except the heading and the last element (which can be calculated as the sum of all elements above it). The length of the list is n (the user is given).
Declare as real :: bracket (10).
3. A list of real numbers in [0.100] for the second column of the table above except header. The length of the list is n 1 (n has to give the user).
Declare as real :: percent (10).
4. Income.
Declare it as real :: income.
Homework Equations
i have to create a program that is doing this:
How many tax brackets?
3
Tax bracket 1:
10000
Percentage for tax bracket 1:
5
Tax bracket 2:
5000
Percentage for tax bracket 2:
10
but i don't know how to show the number in front of bracket:"The tax bracket (1..2):"
The Attempt at a Solution
do i=1,n
print *, "Tax bracket:"
read *, bracket(i)
end do
do i=1,n
print *, "Percentage for tax bracket ?:"
read *, percent(i)
end do