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