Friday, August 26, 2016

uri- 1177 - Array Fill II

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n, i, j = 0;
    std::cin >> n;
    for (i = 0; i < 1000; i++){
        if (j >= n)
            j = 0;
        printf("N[%d] = %d\n", i, j++);
    }
    return 0;
}

No comments: