Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  mf
Language: C/C++
Code:
#include <stdio.h>
#include <math.h>
int main(void) {
     int a,p,r,n,c;
     printf("Enter principle ");
        scanf("%d",&p);
     printf("Enter CAGR ");
        scanf("%d",&r);
     printf("Enter period in years ");
        scanf("%d",&n);
     c=1+(r/100);
     int i;
     for(i=0;i<n;i++)
     {
         a=p*c;
         p=p+50000;
     }
     printf("Amount at the end of period is %d",a);
     return 0;
}


          
Comments: