Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- double n,a,b,c,c1,d;
- int i,count;
- while(scanf("%lf %lf",&a,&b)==2)
- {
- count=0;
- if(a==0||b==0)
- break;
- for(i=a;i<=b;i++)
- {
- n=i;
- c=sqrt(n);
- // cout<<c<<endl;
- c1=floor(sqrt(n));
- // cout<<c1<<endl;
- if((c-c1)==0)
- count++;
- }
- cout<<count<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement