#include<conio.h>
#include<stdio.h>
#include<math.h>
void main()
{
int p,t,n,si,ci;
float r;
printf("Simple Interest ") ;
printf("\nEnter Principal, Rate and Time ");
scanf("%d%f%d",&p,&r,&t);
si=(p*r*t)/100;
printf("\nSimple interest is : %d",si);
printf("\nCompound Interest");
printf("\nEnter principal,rate,time and CI per yr ");
scanf("%d%d%d%d",&p,&r,&t,&n);
ci=p*pow((1+r/n),(n*t));
printf("\nCompound Interest is : %d",ci);
getch();
}
#include<stdio.h>
#include<math.h>
void main()
{
int p,t,n,si,ci;
float r;
printf("Simple Interest ") ;
printf("\nEnter Principal, Rate and Time ");
scanf("%d%f%d",&p,&r,&t);
si=(p*r*t)/100;
printf("\nSimple interest is : %d",si);
printf("\nCompound Interest");
printf("\nEnter principal,rate,time and CI per yr ");
scanf("%d%d%d%d",&p,&r,&t,&n);
ci=p*pow((1+r/n),(n*t));
printf("\nCompound Interest is : %d",ci);
getch();
}
No comments:
Post a Comment
Please write your doubts