bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

APC-PRAC-014.c (1085B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* Write a program to calculate and display the maturity amount taking
      8 the sum and number of days as input.
      9     No. of Days     Rate of Interest
     10     ===========     ================
     11     <= 180          5.57 %
     12     181 - 364       7.75 %
     13     365 - 500       9.25 %
     14     > 500           9.15 %
     15 */
     16 
     17 // This code has not been compiled.
     18 // If you find any issues, please create a new issue on GitHub regarding them.
     19 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues
     20 
     21 #include <stdio.h>
     22 
     23 int main()
     24 {
     25     double p, t, r, si;
     26     int days;
     27     printf("Enter the Principle, Time (Days) : ");
     28     scanf("%lf %d", &p, &days);
     29     if (days > 0 && days <= 180)
     30         r = 5.57;
     31     else if (days > 180 && days <= 364)
     32         r = 7.75;
     33     else if (days > 364 && days <= 500)
     34         r = 9.25;
     35     else if (days > 500)
     36         r = 9.15;
     37     si = (p * t * r) / 100;
     38     printf("\nMaturity Amount : %d", si + p);
     39     return 0;
     40 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror