Posts

Showing posts with the label best technical programing

Best program to calculate compound interest

      C ODE:- #include <stdio.h> int main() {     int p,t;     float i,r,a;     printf("Enter the principle amount.");     scanf("%d",&p);     printf("Enter the rate: ");     scanf("%f",&r);     printf("Enter the total time taken: ");     scanf("%d",&t);     for(int j=1;j<=t;j++)     {         i=p*r/100;         a=i+p;         p=a;         printf("Amount after %d years= %f\n",j,a);     }     printf("*******Total amount to paid= %f*******",a);     return 0; }