APC-PRAC-014.c (949B)
1 /* Write a program to calculate and display the maturity amount taking 2 the sum and number of days as input. 3 No. of Days Rate of Interest 4 =========== ================ 5 <= 180 5.57 % 6 181 - 364 7.75 % 7 365 - 500 9.25 % 8 > 500 9.15 % 9 */ 10 11 // This code has not been compiled. 12 // If you find any issues, please create a new issue on GitHub regarding them. 13 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues 14 15 #include <stdio.h> 16 17 int main() 18 { 19 double p, t, r, si; 20 int days; 21 printf("Enter the Principle, Time (Days) : "); 22 scanf("%lf %d", &p, &days); 23 if (days > 0 && days <= 180) 24 r = 5.57; 25 else if (days > 180 && days <= 364) 26 r = 7.75; 27 else if (days > 364 && days <= 500) 28 r = 9.25; 29 else if (days > 500) 30 r = 9.15; 31 si = (p * t * r) / 100; 32 printf("\nMaturity Amount : %d", si + p); 33 return 0; 34 }