Tuesday, 29 August 2017

C Program to Calculate Simple Interest

/*    Calculate Simple interest    */

#include<stdio.h>
int main()
{
 float amount,interest,time,ans;
  printf("Type your principle amount : ");
  scanf("%f",&amount);
  printf("\n Type your rate of intrest : ");
  scanf("%f",&interest);
  printf("\n Type time (in year) : ");
  scanf("%f",&time);
  ans=amount*interest*time/100;
  printf("\n You will get intrest : %.2f",ans);
 return 0;
}

No comments:

Post a Comment