Program for Simple Interest


Program for Simple Interest
#include<stdio.h>
#include<conio.h>
void main()
{
int year,per=10,pri=5000;
float amt,val,intr;
clrscr();
amt=pri;
intr=0.11;
year=0;
printf("  Simple  Interest  As  Per  Year");
printf("\n _________________________________");

printf(" \n Year     Amount:");
while(year<=per)
{
printf("\n%5d      %8.2f\n",year,amt);
val=amt+intr*amt;
year=year+1;
amt=val;
}
/*printf("      -----------");
printf("\n      ___________"); */
getch();
}

No comments:

Post a Comment