Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- # include <conio.h>
- void stars()
- {
- printf("********************************************************\n");
- }
- int getinput()
- {
- int ip;
- void getin(int * one,int * two,int * three,int * four);
- printf("Press 1 for clockwise and 2 for counterclockwise: ");
- scanf("%i", &ip);
- if(ip=1)
- {
- int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- one=four;
- two=one;
- three=two;
- four=three;
- }
- if(ip=2)
- {
- int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- one=two;
- two=three;
- three=four;
- four=one;
- }
- return ip;
- }
- int preswitch(int * one, int * two, int * three, int * four)
- {
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- }
- int getinput2()
- {
- int iptwo;
- printf("Once more: Press 1 for clockwise and 2 for counterclockwise: ");
- scanf("%itwo", &iptwo);
- if(iptwo=1)
- {
- int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- one=four;
- two=one;
- three=two;
- four=three;
- }
- if(iptwo=2)
- {
- int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- one=two;
- two=three;
- three=four;
- four=one;
- }
- return iptwo;
- }
- void disp()
- { int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- printf("",one);
- printf(" ");
- printf("",two);
- printf("\n");
- printf("",four);
- printf(" ");
- printf("",three);
- printf("\n");
- }
- int main()
- {
- int *one;
- int *two;
- int *three;
- int *four;
- *one = 1;
- *two = 2;
- *three = 3;
- *four = 4;
- stars();
- disp();
- getinput();
- getinput2();
- disp();
- stars();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement