continue.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* Copyright (C) 2016 Jeremiah Orians
  2. * This file is part of M2-Planet.
  3. *
  4. * M2-Planet is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * M2-Planet is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include<stdio.h>
  18. #include <stdlib.h>
  19. char* int2str(int x, int base, int signed_p);
  20. int main()
  21. {
  22. int i;
  23. int j;
  24. for(i = 0; i < 10; i = i + 1)
  25. {
  26. fputs(int2str(i, 10, 0), stdout);
  27. if(i != 1) continue;
  28. fputc(' ', stdout);
  29. }
  30. fputc('\n', stdout);
  31. for(i = 0; i < 10; i = i + 1)
  32. {
  33. for(j = 0; j < 10; j = j + 1)
  34. {
  35. if(j == 2) continue;
  36. fputs(int2str(i, 10, 0), stdout);
  37. fputs(int2str(j, 10, 0), stdout);
  38. fputc(' ', stdout);
  39. }
  40. }
  41. fputc('\n', stdout);
  42. i = -1;
  43. while(i < 9)
  44. {
  45. i = i + 1;
  46. fputs(int2str(i, 10, 0), stdout);
  47. if(i != 3) continue;
  48. fputc(' ', stdout);
  49. }
  50. fputc('\n', stdout);
  51. i = -1;
  52. while(i < 9)
  53. {
  54. i = i + 1;
  55. j = -1;
  56. while(j < 9)
  57. {
  58. j = j + 1;
  59. if(j == 4) continue;
  60. fputs(int2str(i, 10, 0), stdout);
  61. fputs(int2str(j, 10, 0), stdout);
  62. fputc(' ', stdout);
  63. }
  64. }
  65. fputc('\n', stdout);
  66. i = -1;
  67. do
  68. {
  69. i = i + 1;
  70. fputs(int2str(i, 10, 0), stdout);
  71. if(i != 5) continue;
  72. fputc(' ', stdout);
  73. }while(i < 9);
  74. fputc('\n', stdout);
  75. i = -1;
  76. do
  77. {
  78. i = i + 1;
  79. j = -1;
  80. do
  81. {
  82. j = j + 1;
  83. if(j == 6) continue;
  84. fputs(int2str(i, 10, 0), stdout);
  85. fputs(int2str(j, 10, 0), stdout);
  86. fputc(' ', stdout);
  87. }while(j < 9);
  88. }while(i < 9);
  89. fputc('\n', stdout);
  90. /* All tests passed */
  91. return 0;
  92. }