SHARE
TWEET

Untitled

a guest Aug 21st, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main()
  4. {
  5.   int x, p, sum=0;
  6.   scanf("%d %d", &x, &p) ;
  7.   p=100-p;
  8.   while(x>0)
  9.   {
  10.      sum=sum+x;
  11.      x=(p*x)/100;
  12.   }
  13.   print("%d", sum);
  14.   return 0;
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top