Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int x,y;
- M1:cout<<"\nВведите точки Х и Y через пробел\n";
- cin>>x>>y;
- switch(x){
- case 0:{
- switch(y){
- case 0: cout<<"2"; goto M1;
- case 1: cout<<"2"; goto M1;
- case 2: cout<<"0"; goto M1;
- }
- break;
- }
- case 1:{
- switch(y){
- case 0: cout<<"1"; goto M1;
- case 1: cout<<"0"; goto M1;
- case 2: cout<<"2"; goto M1;
- }
- break;
- }
- case 2:{
- switch(y){
- case 0: cout<<"1"; goto M1;
- case 1: cout<<"2"; goto M1;
- case 2: cout<<"0"; goto M1;
- }
- break;
- }
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement