/* Calculation of simple interest */
#include<stdio.h>
#include<conio.h>
main( )
{
int p, n ;
float r, si ;
printf( "Enter values of p, n(year),r(rate)" ) ;
scanf ( "%d %d %f", &p, &n, &r ) ;
si = p * n * r / 100 ;
printf ("%f",si);
getch();
}
#include<stdio.h>
#include<conio.h>
main( )
{
int p, n ;
float r, si ;
printf( "Enter values of p, n(year),r(rate)" ) ;
scanf ( "%d %d %f", &p, &n, &r ) ;
si = p * n * r / 100 ;
printf ("%f",si);
getch();
}
No comments:
Post a Comment