Search C Program | nimishsoft@gmail.com

Calculate Simple Interest

/*    Calculate Simple interest    */
#include<stdio.h>
int main()
{
 float p;
 float ir,t;
 float in;

  printf("Type your principle amount : ");
  scanf("%f",&p);
  printf("\n Type your rate of intrest : ");
  scanf("%f",&ir);
  printf("\n Type time (in year) : ");
  scanf("%f",&t);
  in=p*ir*t/100;
  printf("\n You will get intrest : %.2f",in);
 return 0;
}

8 comments:

  1. your doc is very useful!!! Appreciate for the details about the C Programing. its very helpfull for learning a gud programing using C.
    Thanks for ur afferts Nimish.

    ReplyDelete
  2. printf("\n You will get intrest : %.2f",in);
    in this line y we using %.2f
    can u explain it

    ReplyDelete
  3. is that %.2f or %2f

    ReplyDelete
  4. thanks sir for this programme

    ReplyDelete
  5. Nice article admin thanks for share your atricle keep share your knowledge i am waiting for your new post check mens winter jackets polo shirts kindly review and reply me

    ReplyDelete