We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5c05c2 commit 4036926Copy full SHA for 4036926
interest.c
@@ -0,0 +1,28 @@
1
+/**
2
+ * C program to calculate simple interest
3
+ */
4
+
5
+#include <stdio.h>
6
7
+int main()
8
+{
9
+ float principle, time, rate, SI;
10
11
+ /* Input principle, rate and time */
12
+ printf("Enter principle (amount): ");
13
+ scanf("%f", &principle);
14
15
+ printf("Enter time: ");
16
+ scanf("%f", &time);
17
18
+ printf("Enter rate: ");
19
+ scanf("%f", &rate);
20
21
+ /* Calculate simple interest */
22
+ SI = (principle * time * rate) / 100;
23
24
+ /* Print the resultant value of SI */
25
+ printf("Simple Interest = %f", SI);
26
27
+ return 0;
28
+}
0 commit comments