bsc

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

root / semester_1 / letusc / luc054.c

luc054.c (605B)


      1 /* Use 'interest.h' macros to calculate Simple Interest and Amount.
      2 */
      3 /* Let Us C, Chap- 12 (The C Preprocessor), Qn No.: C(c) */
      4 /* This file is auto-generated by a bot. */
      5 /* This code is not compiled; it is for reference only. */
      6 
      7 
      8 #include <stdio.h>
      9 #include <math.h>
     10 #include <stdlib.h>
     11 
     12 #include "interest.h"
     13 
     14 int main()
     15 {
     16     float p, r, t, si, amt;
     17 
     18     printf("Enter Principal, Rate and Time: ");
     19     scanf("%f %f %f", &p, &r, &t);
     20 
     21     si = SIMPLE_INTEREST(p, r, t);
     22     amt = AMOUNT(p, si);
     23 
     24     printf("Simple Interest: %.2f\n", si);
     25     printf("Total Amount: %.2f\n", amt);
     26 
     27     return 0;
     28 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror