Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int sum=0,amount,discount;
  6. scanf("%d %d",&amount,&discount);
  7. discount = 100 - discount;
  8. while(amount>=1){
  9. sum+=amount;
  10. amount = (amount*discount)/100;
  11. }
  12. printf("%d",sum);
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement