continue.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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* numerate_number(int a);
  20. void file_print(char* s, FILE* f);
  21. int main()
  22. {
  23. int i;
  24. int j;
  25. for(i = 0; i < 10; i = i + 1)
  26. {
  27. file_print(numerate_number(i), stdout);
  28. if(i != 1) continue;
  29. fputc(' ', stdout);
  30. }
  31. fputc('\n', stdout);
  32. for(i = 0; i < 10; i = i + 1)
  33. {
  34. for(j = 0; j < 10; j = j + 1)
  35. {
  36. if(j == 2) continue;
  37. file_print(numerate_number(i), stdout);
  38. file_print(numerate_number(j), stdout);
  39. fputc(' ', stdout);
  40. }
  41. }
  42. fputc('\n', stdout);
  43. i = -1;
  44. while(i < 9)
  45. {
  46. i = i + 1;
  47. file_print(numerate_number(i), stdout);
  48. if(i != 3) continue;
  49. fputc(' ', stdout);
  50. }
  51. fputc('\n', stdout);
  52. i = -1;
  53. while(i < 9)
  54. {
  55. i = i + 1;
  56. j = -1;
  57. while(j < 9)
  58. {
  59. j = j + 1;
  60. if(j == 4) continue;
  61. file_print(numerate_number(i), stdout);
  62. file_print(numerate_number(j), stdout);
  63. fputc(' ', stdout);
  64. }
  65. }
  66. fputc('\n', stdout);
  67. i = -1;
  68. do
  69. {
  70. i = i + 1;
  71. file_print(numerate_number(i), stdout);
  72. if(i != 5) continue;
  73. fputc(' ', stdout);
  74. }while(i < 9);
  75. fputc('\n', stdout);
  76. i = -1;
  77. do
  78. {
  79. i = i + 1;
  80. j = -1;
  81. do
  82. {
  83. j = j + 1;
  84. if(j == 6) continue;
  85. file_print(numerate_number(i), stdout);
  86. file_print(numerate_number(j), stdout);
  87. fputc(' ', stdout);
  88. }while(j < 9);
  89. }while(i < 9);
  90. fputc('\n', stdout);
  91. /* All tests passed */
  92. return 0;
  93. }