Advertisement
PROFESSOR_AIH

Rest of a Division

Apr 7th, 2022
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int x,y,i;
  5.     scanf("%d %d",&x,&y);
  6.     if(x<y)
  7.     {
  8.         for(i=x+1; i<y; i++)
  9.         {
  10.             if(i%5==2 || i%5==3)
  11.                 printf("%d\n",i);
  12.         }
  13.     }
  14.     else if(x>y)
  15.     {
  16.         for(i=y+1; i<x; i++)
  17.         {
  18.             if(i%5==2 || i%5==3)
  19.                 printf("%d\n",i);
  20.         }
  21.     }
  22.     return 0;
  23. }
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement