compound interest program in c










#include<stdio.h>
#include<math.h>
int main(){
    float p,r,t,ci;
    printf("Enter principle amount : ");
    scanf("%f",&p);
    printf("\nEnter interest rate: ");
    scanf("%f",&r);
    printf("\nEnter time period in year : ");
    scanf("%f",&t);
    ci = p*pow((1 + r/100),t);
    printf("\nCompound interest is : %f",ci);
    return 0;
}





Alogrithm:
**




4 comments:

Anonymous said...

Thanks You Very very much u saved my time

Thanks
Noushadali

Favourites said...

thank u so much

Anonymous said...

thank u

Anonymous said...

#include
#include
int main(void)
{
int call=0,Reject=0,avg,t1,t2,t3,i,Offer=0,R1,R2,choice=1;
char name;
while(choice==1)
{
/*printf("enter the name of the candidate :\n");
scanf("%c",&name);*/

printf("enter the test values of :\n");
scanf("%d%d%d",&t1,&t2,&t3);
avg=((t1+t2+t3)/3);
printf("average=%d",avg);
if(t1>75&&t2>75&&t3>75&&avg>=80)
{
printf("interview call letter sent to the candidate\n");
call++;
}
else
{
printf("Reject cal letter sent to the candidate\n");
Reject++;
printf("IF YOU WANT TO CONTINUE ELSE PRESS ANY NUMBER\n");
scanf("%d",&choice);
continue;
}

printf("Round 1 marks of the candidate:");
scanf("%d",&R1);
printf("Round 2 marks of the candidate:");
scanf("%d",&R2);

if(R1>5&&R2>7)
{
printf("Offer letter sent to the candidate\n");
Offer++;
}
else
{
printf("Rejectleter sent to the candidate");
Reject++;
printf("IF YOU WANT TO CONTINUE ELSE PRESS ANY NUMBER\n");
scanf("%d",&choice);
continue;
}
printf("IF YOU WANT TO CONTINUE ELSE PRESS ANY NUMBER\n");
scanf("%d",&choice);
}

printf("NO OF MEMBERS GOT THE INTERVIEW CALL LETTER:%d\n",call);
printf("NO OF MEMBERS GOT THE OFFER LETTER:%d\n",Offer);
printf("NO OF MEMBERS GOT THE REJECTION LETTER:%d\n",Reject);

getch();
}