Advertisement
Jitun

b solution

Mar 28th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include<stdio.h>
  2. main()
  3. {
  4. int a,b,i,c,count;
  5.  
  6. while(scanf("%d%d",&a,&b)!=EOF)
  7. {
  8.  
  9. count=0;
  10. for(i=a;i<b;i++)
  11. {
  12. c=i*i;
  13. if(c<=b){
  14. count++;
  15. }
  16. else
  17. count;
  18.  
  19. }
  20. printf("%d\n",count);
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement