Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <conio.h>
  3.  
  4. void stars()
  5. {
  6. printf("********************************************************\n");
  7. }
  8.  
  9. int getinput()
  10. {
  11. int ip;
  12.  
  13. void getin(int * one,int * two,int * three,int * four);
  14.  
  15. printf("Press 1 for clockwise and 2 for counterclockwise: ");
  16. scanf("%i", &ip);
  17.  
  18.  
  19.  
  20.  
  21. if(ip=1)
  22. {
  23. int *one;
  24. int *two;
  25. int *three;
  26. int *four;
  27. *one = 1;
  28. *two = 2;
  29. *three = 3;
  30. *four = 4;
  31.  
  32. one=four;
  33. two=one;
  34. three=two;
  35. four=three;
  36. }
  37. if(ip=2)
  38. {
  39.  
  40. int *one;
  41. int *two;
  42. int *three;
  43. int *four;
  44.  
  45. *one = 1;
  46. *two = 2;
  47. *three = 3;
  48. *four = 4;
  49.  
  50. one=two;
  51. two=three;
  52. three=four;
  53. four=one;
  54.  
  55. }
  56. return ip;
  57. }
  58.  
  59. int preswitch(int * one, int * two, int * three, int * four)
  60. {
  61. *one = 1;
  62. *two = 2;
  63. *three = 3;
  64. *four = 4;
  65.  
  66.  
  67.  
  68. }
  69.  
  70. int getinput2()
  71. {
  72. int iptwo;
  73. printf("Once more: Press 1 for clockwise and 2 for counterclockwise: ");
  74. scanf("%itwo", &iptwo);
  75.  
  76.  
  77.  
  78. if(iptwo=1)
  79. {
  80. int *one;
  81. int *two;
  82. int *three;
  83. int *four;
  84.  
  85. *one = 1;
  86. *two = 2;
  87. *three = 3;
  88. *four = 4;
  89.  
  90. one=four;
  91. two=one;
  92. three=two;
  93. four=three;
  94. }
  95. if(iptwo=2)
  96. {
  97. int *one;
  98. int *two;
  99. int *three;
  100. int *four;
  101.  
  102. *one = 1;
  103. *two = 2;
  104. *three = 3;
  105. *four = 4;
  106.  
  107. one=two;
  108. two=three;
  109. three=four;
  110. four=one;
  111. }
  112. return iptwo;
  113. }
  114.  
  115. void disp()
  116. { int *one;
  117. int *two;
  118. int *three;
  119. int *four;
  120. *one = 1;
  121. *two = 2;
  122. *three = 3;
  123. *four = 4;
  124. printf("",one);
  125. printf(" ");
  126. printf("",two);
  127. printf("\n");
  128. printf("",four);
  129. printf(" ");
  130. printf("",three);
  131. printf("\n");
  132. }
  133. int main()
  134. {
  135.  
  136. int *one;
  137. int *two;
  138. int *three;
  139. int *four;
  140. *one = 1;
  141. *two = 2;
  142. *three = 3;
  143. *four = 4;
  144. stars();
  145. disp();
  146. getinput();
  147. getinput2();
  148. disp();
  149. stars();
  150.  
  151. return 0;
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement