bsc

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

luc054.c (796B)


      1 /*
      2  * Author  : Amit Dutta <amitdutta4255@gmail.com>
      3  * Date    : 08 Feb 2026
      4  * Repo    : https://github.com/notamitgamer/bsc
      5  * License : MIT License (See the LICENSE file for details)
      6  */
      7 
      8 /* Use 'interest.h' macros to calculate Simple Interest and Amount.
      9 */
     10 /* Let Us C, Chap- 12 (The C Preprocessor), Qn No.: C(c) */
     11 /* This file is auto-generated by a bot. */
     12 /* This code is not compiled; it is for reference only. */
     13 
     14 
     15 #include <stdio.h>
     16 #include <math.h>
     17 #include <stdlib.h>
     18 
     19 #include "interest.h"
     20 
     21 int main()
     22 {
     23     float p, r, t, si, amt;
     24 
     25     printf("Enter Principal, Rate and Time: ");
     26     scanf("%f %f %f", &p, &r, &t);
     27 
     28     si = SIMPLE_INTEREST(p, r, t);
     29     amt = AMOUNT(p, si);
     30 
     31     printf("Simple Interest: %.2f\n", si);
     32     printf("Total Amount: %.2f\n", amt);
     33 
     34     return 0;
     35 }
© 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