Program to print the Simple interest in c-language

Program to print the Simple interest in c-language

#include<stdio.h>
int main()
{
float p,r,t,s;
printf("Enter principle value\n");
scanf("%f",&p);
printf("Enter rate of interest \n");
scanf("%f",&r);
printf("Enter time \n");
scanf("%f",&t);
s=(p*r*t)/100;
printf("Simple Interest=%f",s);
}

OUTPUT
Enter principle value
100
Enter rate of interest
2.5
Enter time
4
Simple Interest=10.000000

From above program you got the basis idea of formula implementation ,and also you aware to float data type.

If you like this program then you can share it and for any issues you can direct contact with me from Home Page.


For regular updates you can also follow my site.

Comments

Popular posts

Creative pattern of butterfly in C-language

Introduction of C-language.

Variable & Datatype for C-programming

Program to see all ASCII value using for loop in C-language

Errors in C-language

Program to find the sum of two array into the third in C-language

Program to cheque enter number is even or odd in c-language

Program to show present time and date in C-language

Binary searching in C-language

Syntax of C-language