Advertisement
Guest User

EMI Calculator

a guest
Nov 19th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. Tumi Bolbe –
  2. Loan calculator khub choto kintu besh dorkari ektu application. Onek bank er ba financial protisthan er website ba office e customer der jonne ei Loan Calculator er bebostha thake. Karon Loan Calculation er boro ekta logic ache ja customer er jonne sohoje ber kora muskil. Ei chotto application ta loan er kisti ber korar kaj ke sohoj kore dite pare.
  3.  
  4. Udaharon shorup ami 5 bochor er jonne 10 lac taka BRAC Bank theke loan nebo. Se khetre amar proti mash e koto taka kore loan sodh korte hobe seta kintu sudhu 10 lac ke 60 (12 mash x 5 bochor = 60 mash) diye bhag dilei pawa jabena. Er alada logic ache. Ei application thakle easily nijei ber kora sombhob bank expert der help charai je amar loan koto hote pare. Monthly ei installment rate ke EMI ba equated monthly installment (EMI) bola hoy.
  5.  
  6. Customer jeno nijei eta ber korte pare tai onek bank ei subidha tader website r rakhen.
  7.  
  8. Prothome Library file gulo amra include korbo, math library ta dorkar mathematical task solve er jonne:
  9.  
  10. #include <stdio.h>
  11. #include <math.h>
  12.  
  13. Tumi Bolbe -- Tarpor main function suru korbo, integer karon return 0 dhorechi, jehetu ei function nije kichu return korchena, but er bhitor theke print hocche:
  14.  
  15. int main()
  16. {
  17.  
  18. Tumi Bolbe -- kichu variable dhore nicchi, principal "customer total je amount er loan nebe ba credit nebe tar amount", "rate holo ami je percentage rate e bank ba financial institute ke pay korbo", "time holo je koy bochore customer taka ta sodh korbe", ar "emi variable e customer er per month er kisti r poriman" save rakhbo.
  19.  
  20. float principal, rate, time, emi;
  21.  
  22. Tumi Bolbe -- ebar 3 ta scanf diye ami customer er kach theke principal loan/credit amount, interest er rate, number of year jar moddhe customer sodh korbe, ei 3 ta jinish customer er kas theke nebo.
  23.  
  24. printf("Enter Principal Amount: ");
  25. scanf("%f", &principal);
  26.  
  27. printf("Enter Rate: ");
  28. scanf("%f", &rate);
  29.  
  30. printf("Enter Time in Year: ");
  31. scanf("%f", &time);
  32.  
  33. Tumi Bolbe -- prothom e 100 ar 12 mash ke gun diye, rate ke ei value diye bhag dile ek mash er interest rate pabo.
  34.  
  35. rate = rate/(12*100); /* one month interest */
  36.  
  37. Tumi Bolbe -- tarpor "customer je koy bochore loan sodh korbe sei time ke 12 diye gun diye, total koy mash e se loan sodh korbe seta ber korbo
  38.  
  39. time = time*12; /* one month period */
  40.  
  41. Tumi Bolbe -- tarpor ei record gulo ke EMI calculation er sutre felbo.
  42.  
  43. emi = (principal * rate * pow (1 + rate, time)) / (pow (1 + rate, time) - 1);
  44.  
  45. Tumi Bolbe -- taholei per month e amar loan sodh korte koto khoroch porbe seta ber korte parbo.
  46.  
  47. printf("Monthly EMI is = %f\n", emi);
  48.  
  49. return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement