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