Search:

Submit Article

# PROGRAM TO FIND VALUE OF V USING V = P(1 + R)^N

Posted By: Rayner Fischer     Category: C Programming     Views: 8478

## Code for PROGRAM TO FIND VALUE OF V USING V = P(1 + R)^N in C Programming

```#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
int i,v,p,n,a;
float r;
char ch;

clrscr();

while(ch != 'n')
{
printf("\nEnter the value of p ::  ");
scanf("%d",&p);

printf("Enter the value of r ::  ");
scanf("%f",&r);

printf("Enter the value of n ::  ");
scanf("%d",&n);

a = p * (1 + r);
v = pow(a,n);

printf("Value of v is ::  %d",v);

printf("\nDo you want to continue  ? ");

flushall();
ch = getchar();
}
getch();
}

/*    **********    OUTPUT    **********    Enter the value of p ::  1000    Enter the value of r ::  0.10    Enter the value of n ::  1    Value of v is ::  1100    Do you want to continue  ? y    Enter the value of p ::  2000    Enter the value of r ::  0.11    Enter the value of n ::  2    Value of v is ::  8761    Do you want to continue  ? n*/```
Share:

Didn't find what you were looking for? Find more on PROGRAM TO FIND VALUE OF V USING V = P(1 + R)^N Or get search suggestion and latest updates.

 Rayner Fischer author of PROGRAM TO FIND VALUE OF V USING V = P(1 + R)^N is from Frankfurt, Germany. View All Articles

 Please enter your CommentComment should be atleast 30 Characters.Please put code inside [Code] your code [/Code]. No Comment Found, Be the First to post comment!