Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int p, r, n, y;
- printf("please enter the money:");
- scanf("%d",&p);
- printf("please enter the percent:");
- scanf("%d",&r);
- printf("please enter the years:");
- scanf("%d",&n);
- y=p*pow(1+0.01*r,n);
- printf("your final money is:%d",y);
- return 0;
- }
- /*
- int main()
- {
- int x1, x2, y1, y2, mx, my, answer;
- printf("please enter x1:");
- scanf("%d",&x1);
- printf("please enter y1:");
- scanf("%d",&y1);
- printf("please enter x2:");
- scanf("%d",&x2);
- printf("please enter y2:");
- scanf("%d",&y2);
- mx=x1/2+x2/2;
- my=y1/2+y2/2;
- printf ("your mid point is (%d,%d)",mx ,my);
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement