# Need Help With Psuedocode Assignment.



## xxkronix

I'm new to this site so I'm sorry if I post this in the wrong section. 
I'm taking a computer science course at my college where we are programming with psuedocode. I'm really not to good at this stuff. Last assignment was stuff on While Loops and I did well on that, but this assignment is very tricky for me and we are about to do a lot more stuff on this assignment so if somebody could help me write this code so I know what I'm doing for the rest of the time we are on this subject, I'd really appreciate it!

Here it is:

At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Design a program with a loop that displays the projected semester tuition amount for the next five years.

Edit: This is what I have figured out...Is it technically correct? 

Module main ( )

Declare Integer total = 0
Declare Integer counter

Set tuition = 6000

For counter = 1 To 5
Set tuition = 2 * tuition + tuition * .02
End For

Display “The amount you pay in 5 years of tuition is “, tuition


End Module


----------



## S.T.A.R.S.

It's pretty simple.

You need to make a loop of let's say 5 times (since there are 5 years).And then repeat the code 5 times in order to make the amount bigger for 2 percent every time the loop is executed.

So first you must calculate how MANY dollars is 2% of total 6000 dollars (which is 100%).And then if the first time (time number 0) the tuition is 6000 dollars then all you have to do in the next 5 loops (1,2,3,4 and 5) is to increase the tuition result number for 2% which is 120 dollars approximately.

So you can simply add 120 to the result all 5 times OR you can divide:

6000 / 100 * 2 = 120

120 / 6000 = 0,02

0,02 * 100 = 2%

So:

Step 1: Calculate how much is 2% of 6000 dollars...
Step 2: Add that number to the result number all 5 times...

OR

Step 3: Subtract the starting value (result number) from the current increased value.And then divide the result by the starting value and then all you have to do is convert this value to a percentage.Multiply the result by 100.This will allow you to convert the value into a percentage.

But Step 2 is a lot more simple...

If this still does not make any sense then take a look at the following link which describes how to increase the percentage of any number:

http://www.wikihow.com/Calculate-Percentage-Increase

By the way be sure to use FLOAT instead of INT if you are planning to use decimal numbers since that will be needed for the percentage calculation.
Pure INTEGERS such as Int32 support only normal numbers such as 1,2,3,4,5,6,7...and so on,but do NOT support decimal numbers.




Cheers!


----------

