Int nCount=5; For (int I=0; I & lt; NCount; + + I) { for (int j=0; J & lt; NCount; + + j) { Int nOutput=(I + j) % (nCount) + 1; Printf (" % d ", nOutput); }
Printf (" \ r \ n "); }
CodePudding user response:
So:
#include
Int main () { int i; int j; for (j=1; J<6; J++) { For (I=j; i{ If (I & lt; 6) Printf (" % d ", I); The else Printf (" % d ", I % 5); printf(" "); } printf("\n"); } return 0; }