write a c program to find simple interest
c-program
write a c program to find simple interest
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- float P,R,T,SI;
- clrscr();
- printf("enter the values of principal,rate of interest,time(in years)");
- scanf("%f%f%f",&P,&R,&T);
- SI=0.01*P*R*T;
- printf("simple interest = %f",SI);
- getch();
- }
output
precautions :-
- you take care about semi colon (terminators )
- if you are using float data base than keep in mind with float we use %f
- at last don't forget to write getch();
- and don't forget to close the entire program

Comments
Post a Comment