Our first C program would simply calculate simple interest for a set of values representing principle, number of years and rate of interest.

/* Calculation of simple interest */
main( )
{
int a, b;
float c, si ;
a = 1000 ;
b = 3 ;
c = 8.5 ;
/* formula for simple interest */
si = (a * b * c) / 100 ;
printf ( "%f" , si ) ;
}


0 comments to "SIMPLE C PROGRAM"

Post a Comment

Powered by Blogger.