Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int x,z,sum=0,count=0;
- scanf("%d",&x);
- while(1)
- {
- scanf("%d",&z);
- if(z<=x)
- continue;
- else
- {
- while(1)
- {
- sum=sum+x;
- count++;
- if(sum>=z)
- break;
- else
- x++;
- }
- break;
- }
- }
- printf("%d\n",count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement