Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int x,p,sum=0;
- scanf("%d%d",&x,&p);
- while(x>0){
- x=(x*p)/100;
- sum+=x;
- }
- printf("%d",sum);
- printf("\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement