Skip to content

Commit 402f91c

Browse files
authored
Create intrest
1 parent c5c05c2 commit 402f91c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

intrest

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include<iostream>
2+
#include<conio.h>
3+
using namespace std;
4+
int main()
5+
{
6+
7+
float n,r,p,a,result;
8+
int i;
9+
cout<<"enter the value of the r , n & p"<<endl;
10+
cin>>r>>n>>p;
11+
a=r+1;
12+
for ( i = 1; i==(int)n-1; i++)
13+
{
14+
/* code */
15+
a=a*(1+r);
16+
}
17+
result=a*p;
18+
cout<<"the result is : "<<result;
19+
getch();
20+
return 0;
21+
}

0 commit comments

Comments
 (0)