Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n, m, i, j, c=0;
- scanf("%d %d", &n, &m);
- int a[100]={0};
- X:
- for(i=0 ; i<n ; i++)
- if(a[i]==0)
- {
- c++;
- if(c==5)
- {
- a[i]=1;
- printf("%d ",i+1);
- c=1;
- }
- }
- for(i=0 ; i<n ; i++)
- if(a[i]==1)
- goto X;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement