fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int n[6] = {5, 4, 3, 2, 1, 0};
  6. for(int i=0; i<5; i++) {
  7. printf("%d ", n[(i+1)%5]);
  8. }
  9.  
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
4 3 2 1 5