C program to calculate Simple Interest.

Question:

Write a C program to calculate simple Interest of a amount.

Source code:

#include<stdio.h> void main() { float principal_amount,rate, time,simple_interset; printf("Enter principal_amount:"); scanf("%f",&principal_amount); printf("Enter rate:"); scanf("%f",&rate); printf("Enter time:"); scanf("%f",&time); simple_interset= (principal_amount*rate*time)/100; printf("simple_interset:%f", simple_interset); }

Output:

Enter principal_amount:1000 Enter rate:3 Enter time:2 simple_interset:60.000000

Comments

Popular posts from this blog

Introduction to Python.

Decision Making Statement.