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