/* Calculation of simple interest for 4 sets of pi, t and rate */
main ( )
{
int pi, t, i ;
float rate, si ;
for ( i = 1 ; i <= 4 ; i = i + 1 )
{
printf ( "Enter values of pi, t, and rate " ) ;
scanf ( "%d %d %f", &pi, &t, &rate ) ;
si = pi * t * rate / 100 ;
printf ( "Simple Interest = Rs.%f\t", si ) ;
}
}




0 comments to "EXAMPLE OF FOR LOOP"

Post a Comment

Powered by Blogger.