Click the Follow Button

C : Calculate simple interest

 How to calculate simple interest.

Input -

/* calculation of interest*/
/* author - Prantik Mukhopadhyay*/


#include <stdio.h>

int main(void)
{
  int i,t;
  float r,p;

  i = 10000;
  t = 4;
  r = 6.25;

  p = i*r*t/100;
  printf(" Principal = %d \n rate = %.2f %% \n Total Interest = %f/n", i, r, p);
  return 0;
}

Output -

 Principal = 10000
 rate = 6.25 %
 Total Interest = 2500.000000

Comments

Popular Posts

TIC - TAC - TOE

Prime and not prime number

do_while loop is to do something again and again