sahajjain01

02.Input principal amount, rate and time and calculate SI

Aug 16th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. //Program to input principal amount, rate and time and calculate SI
  2. #include<stdio.h>
  3. #include<conio.h>
  4.  
  5. void main()
  6. {
  7.     float rate, principle, time;
  8.  
  9.     clrscr();
  10.  
  11.     printf("Enter principle, rate and time (in years): ");
  12.     scanf("%f%f%f", &principle, &rate, &time);
  13.     printf("The simple interest for Rs.%f at rate %f for the duration %f years is: %f", principle, rate, time, principle * rate * time * 0.01);
  14.  
  15.     getch();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment