# Programming Calculations, Program Not Running

*label*Programming

*timer*Asked: Apr 9th, 2017

**Question description**

So I have these two programs that I created for an assignment, and I am trying to run them with Visual Logic, which is the program I have to use, however, I am getting an error when I run the test since there is something wrong with the output but I cannot figure it out.

**Simple Interest Paid – Calculation 1**

Calculation to determine the amount of interest paid on a loan for the first 5 years. I = p * r * t

Input variables: Principal, InterestRate, Years

Process: InterestAmount= Principal * InterestRate * Years

Output variables: InterestAmount

Input Data module

Write “What is the principal?”

Input Principal

Write “What is the interest rate?”

Input InterestRate

Write “What is the number of years for the loan?”

Input Years

Perform Calculations module

Set InterestAmount= Principal * InterestRate * Years

Output Results module

Write “For a loan of “ + “$”Principal

Write “At a rate of “ + InterestRate”%”

Write “Over a time period of “ + Years

Write “Your total interest amount is “ + “$”InterestAmount

**Bill Cost with Tip – Calculation 2**

The purpose of this calculation is to determine the total bill amount with cost of tip included.

Input variables: BillCost, TipPercept

Processes: TotalBill = (BillCost * TipPercent ) + BillCost

Output variables: TipCost, TotalBill

Input Data module

Write “What is the cost of the bill?”

Input BillCost

Write “What is the tip percentage?”

Input TipPercent

Perform Calculations module

Set TipCost = BillCost * TipPercent

Set TotalBill = BillCost + TipCost

Output Results module

Write “The cost of tip is: “ + “$”TipCost

Write “The total bill cost wit tip is: “ + “$”TotalBill

I need for someone to tell me how to correct this problem in order to be able to run it with Visual Logic. Again, problem is only at the output of both calculations.