Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to put this into chart form?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BobTheRobot




PostPosted: Mon Dec 01, 2014 9:41 am   Post subject: How to put this into chart form?

What is it you are trying to achieve?
How do i put this piece of code into chart form.


What is the problem you are having?



Describe what you have tried to solve this problem
<for month:1..maxint
put month:5,monthlypayment:20,monthlyinterest:30,mortgageAmount:50>
i put something like that previously. "Month just took over the program and continued by itself or it'd just stay at 1


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<var housecost, downpayment, mortgageAmount, mortgageAmount1, interestrate, monthlypayment, monthlypayment1, biweeklypayment, amortizationperiod, annualinterest : real
var monthlyinterest1 : real
var reply : string

put "House Cost: " ..
get housecost
put "Mortgage Amount: " ..
get mortgageAmount
put "Enter enterest rate in decimal form  (example:3%=0.03)"
put "Interest Rate: " ..
get interestrate

%-------------------------------------------------------------------------------
%THIS IN CHART FORM
put "Enter the amount you will be paying per month"
get monthlypayment

color (55)
loop
    var monthlyinterest : real := (mortgageAmount * interestrate) / 12
    put "Monthly interest: ", monthlyinterest
    monthlypayment := monthlypayment + monthlyinterest
    put "Paid: ", monthlypayment
    mortgageAmount := mortgageAmount - monthlypayment
   
    put monthlypayment:10,mortgageAmount:20
 
    if mortgageAmount < monthlypayment then
        put "Last Payment: ", mortgageAmount
        put "Left:0"
        color (31)
    end if
   
    if mortgageAmount < 0 then
        put " "
    end if
   
    put "Left: ", mortgageAmount
    exit when mortgageAmount <= 0
    end loop
   color (55)
%--------------------------------------------------------------------------------->



Please specify what version of Turing you are using
<4.1.2>
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: