Simple interest:-
In
this c program we calculate simple interest of given principle amount, here we take two int type variable, principle and time for principle amount and time and roi and interest for rate of interest and store interest likewise.
/*
Program : Simple Interest
Filename : simpleInterest.c
IDE Used To Developed : CodeBlocks
Developed By : Pavito Golui
*/
#include<stdio.h>
int main()
{
int principle, time;
double roi, interest;
printf("Enter the principle amount :");
scanf("%d",&principle);
printf("Enter the time :");
scanf("%d",&time);
printf("Enter the rate of interest :");
scanf("%lf",&roi);
interest= ( (principle * roi) /100 ) *time;
printf("Interest is :%lf",interest);
return 0;
}
Program : Simple Interest
Filename : simpleInterest.c
IDE Used To Developed : CodeBlocks
Developed By : Pavito Golui
*/
#include<stdio.h>
int main()
{
int principle, time;
double roi, interest;
printf("Enter the principle amount :");
scanf("%d",&principle);
printf("Enter the time :");
scanf("%d",&time);
printf("Enter the rate of interest :");
scanf("%lf",&roi);
interest= ( (principle * roi) /100 ) *time;
printf("Interest is :%lf",interest);
return 0;
}
Output :
Enter the principle amount : 15000
Enter the time : 3
Enter the rate of interest : 5
Interest is : 2250.000000
0 comments:
Welcome to you in All Coding Help