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