P020.c (897B)
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 /* WAP to calculate and display the maturity amount 8 taking the sum and number of days as input. 9 No. of Days Rate of Interest 10 Upto 180 days 5.5 % 11 181 to 364 days 7.5 % 12 exact 365 days 9.0 % 13 more than 365 days 8.5 % 14 */ 15 16 #include <stdio.h> 17 int main() 18 { 19 double nod, amt, s, i; 20 printf("Enter the amount and the time in days : "); 21 scanf("%lf %lf", &s, &nod); 22 if (nod <= 180) 23 i = (s * 5.5 * (nod / 365)) / 100; 24 else if (nod > 180.0 && nod <= 364.0) 25 i = (s * 7.5 * (nod / 365)) / 100; 26 else if (nod == 365.0) 27 i = (s * 9.0 * 1) / 100; 28 else if (nod > 365.0) 29 i = (s * 8.5 * (nod / 365)) / 100; 30 amt = s + i; 31 printf("Amount to be paid : %g", amt); 32 return 0; 33 }