Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Simple interest calculation in C

Please note the inputs. float variables are mandatory for the accurate calculation.

#include<stdio.h>
void main( )
{
int p, n ;
float r, si ;
printf ( "Enter values of p, n, r" ) ;
scanf ( "%d %d %f", &p, &n, &r ) ;
si = p * n * r / 100 ;
printf ( "%f" , si ) ;
}