<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by mentos12345</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Mon, 07 Dec 2026 03:24:56 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>loan approval and rejection</title>
            <link>http://forum.lowyat.net/topic/963911</link>
            <description>this is my program .. but i have lots of problem ..&lt;br /&gt;actually i am nt good in C++..&lt;br /&gt;any 1 can help me ? &lt;br /&gt;&lt;br /&gt;&lt;u&gt;the requirement&lt;/u&gt;&lt;br /&gt;it need to get the user income..&lt;br /&gt;get the user loan commitment..&lt;br /&gt;get the user outstanding credit card..&lt;br /&gt;&lt;br /&gt;it calculate how many years they wants pay back for the new loan .. and monthly payment (with interest)..&lt;br /&gt;&lt;br /&gt;it need to calculate how much the user need to pay for the old loan commitment and outstanding credit card per month..&lt;br /&gt;&lt;br /&gt;at last calculate monthly payment for &lt;br /&gt;new loan+old loan+ outstanding credit card balance= x&lt;br /&gt;x is less than 1/3 of salary then the loan approve.. else reject&lt;br /&gt;&lt;br /&gt;&lt;u&gt;my program:&lt;/u&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;br /&gt;double monthly_income() ;&lt;br /&gt;double Loan ();&lt;br /&gt;double outstanding_credit_card_balance ();&lt;br /&gt;double loan_commitment ();&lt;br /&gt;&lt;br /&gt;void main ()&lt;br /&gt;{&lt;br /&gt;double sum_overall,monthly_income,loan,outstanding_credit_card_balance,loan_commitmen;&lt;br /&gt;&lt;br /&gt; monthly_income=monthly_income() ;&lt;br /&gt; loan=loan() ;&lt;br /&gt; outstanding_credit_card_balance=outstanding_credit_card_balance ()  ;&lt;br /&gt; loan_commitment=loan_commitment ()  ;&lt;br /&gt;&lt;br /&gt; sum_overall= loan+mininum_credit_card_balance+sum_loan_commitment;&lt;br /&gt;&lt;br /&gt; if(sum_overall&amp;lt;= monthly_income/3)&lt;br /&gt; {&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;The Loan Is Approve.&amp;quot;;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;The Loan is Rejected.&amp;quot;;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;double monthly_income()&lt;br /&gt;{&lt;br /&gt; double income;&lt;br /&gt; cout&amp;lt;&amp;lt; &amp;quot;Please enter your montly income.&amp;quot; ;&lt;br /&gt; cin&amp;gt;&amp;gt;income;&lt;br /&gt;&lt;br /&gt; return income;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;double loan()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int year ;&lt;br /&gt; double amount,monthly_payment ;&lt;br /&gt; cout&amp;lt;&amp;lt; &amp;quot;Please enter amout that you want to loan in RM.&amp;#092;n&amp;quot;;&lt;br /&gt; cin&amp;gt;&amp;gt;amount ;&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;&amp;#092;nPlease enter the years you want to pay back.&amp;#092;n&amp;quot; ;&lt;br /&gt; cin&amp;gt;&amp;gt;year ;&lt;br /&gt;  //Assume the interest is 5%&lt;br /&gt; monthly_payment=(amount/(year*12))*1.05 ;&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;Your roughly monty payment for your loan is  &amp;quot; &amp;lt;&amp;lt;monthly_payment&amp;lt;&amp;lt;endl;&lt;br /&gt;&lt;br /&gt; return monthly_payment;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;double outstanding_credit_card_balance()&lt;br /&gt;{&lt;br /&gt; double mininum_credit_card_balance;&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;Please enter your mininum payment for your outstanding credit card payment in RM .&amp;#092;n&amp;quot;;&lt;br /&gt; cin&amp;gt;&amp;gt;mininum_credit_card_balance;&lt;br /&gt;&lt;br /&gt; return mininum_credit_card_balance;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;double loan_commitment ()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;#define max_column 100&lt;br /&gt;double loan_commitment[max_column] ;&lt;br /&gt;int number, x;&lt;br /&gt;double sum_loan_commitment;&lt;br /&gt;&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;Please enter number of your loan commitment.&amp;#092;n&amp;quot; ;&lt;br /&gt; cin&amp;gt;&amp;gt;number ;&lt;br /&gt;&lt;br /&gt; for ( x=1; x&amp;lt;=number; x++)&lt;br /&gt; {&lt;br /&gt; cout&amp;lt;&amp;lt;&amp;quot;The monthly payment of the loan commitment &amp;quot;&amp;lt;&amp;lt;x&amp;lt;&amp;lt;&amp;quot; is&amp;quot;  ;&lt;br /&gt; cin&amp;gt;&amp;gt;loan_commitment[x];&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; for (x=1; x&amp;lt;=number; x++)&lt;br /&gt; {&lt;br /&gt; sum_loan_commitment=+loan_commitment[x]  ;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;return sum_loan_commitment ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
            <author>mentos12345</author>
            <category>Codemasters</category>
            <pubDate>Fri, 13 Mar 2009 23:50:36 +0800</pubDate>
        </item>
    </channel>
</rss>
