fork(4) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int i;
  6. char h[3] = {'0', '0', 0};
  7.  
  8. for(i = 0 ; i < 24 ; i++)
  9. {
  10. if((i % 10) < 6)
  11. {
  12. snprintf(h, 3, "%02d", i);
  13. printf("%s:%c%c\n", h, h[1], h[0]);
  14. }
  15. }
  16.  
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
00:00
01:10
02:20
03:30
04:40
05:50
10:01
11:11
12:21
13:31
14:41
15:51
20:02
21:12
22:22
23:32