luc054.c¶
Problem Statement
Use 'interest.h' macros to calculate Simple Interest and Amount.
Metadata¶
| Property | Detail |
|---|---|
| Author | Amit Dutta amitdutta4255@gmail.com |
| Date | 08 Feb 2026 |
| License | MIT License (See the LICENSE file for details) |
Actions¶
💡 You can print or save this file by opening Raw and using your browser.
Source Code¶
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "interest.h"
int main()
{
float p, r, t, si, amt;
printf("Enter Principal, Rate and Time: ");
scanf("%f %f %f", &p, &r, &t);
si = SIMPLE_INTEREST(p, r, t);
amt = AMOUNT(p, si);
printf("Simple Interest: %.2f\n", si);
printf("Total Amount: %.2f\n", amt);
return 0;
}