Advertisement
Farjana_akter

Untitled

Feb 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int main()
  6. {
  7. double n,a,b,c,c1,d;
  8. int i,count;
  9. while(scanf("%lf %lf",&a,&b)==2)
  10. {
  11. count=0;
  12. if(a==0||b==0)
  13. break;
  14. for(i=a;i<=b;i++)
  15. {
  16. n=i;
  17. c=sqrt(n);
  18. // cout<<c<<endl;
  19. c1=floor(sqrt(n));
  20. // cout<<c1<<endl;
  21. if((c-c1)==0)
  22. count++;
  23. }
  24. cout<<count<<endl;
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement