C Programming
Computer Programming

Program in C using function to find the simple interest



Write a Program in C using function to find the simple interest

\* C Program using function to find the simple interest *\

# include < stdio.h >
# include < conio.h >
float   intrest( int, float, float ) ;

int   main( )
{

int p ;
float r, t, si ;
printf(" Enter Principal Amount : ") ;
scanf("%d", &p) ;
printf(" Enter Rate of Intrest : ") ;
scanf("%f" , &r) ;
printf(" Enter time period in Year : ") ;
scanf("%f", &t) ;
si = intrest(p, r, t) ;
printf(" Simple Intrest are %f : ", si) ;
return (0);

}

float   intrest(int p, float r, float t)
{

float si ;
si = ( p * r * t )/100 ;
return si ;

}

Output of Program :

Output of C Program using function to find the simple interest