Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <math.h>
  4. using namespace std;
  5. int main()
  6. {
  7.     setlocale(LC_ALL, "Russian");
  8.     int x,y;
  9.     M1:cout<<"\nВведите  точки Х и Y через пробел\n";
  10.     cin>>x>>y;
  11.     switch(x){
  12.         case 0:{
  13.             switch(y){
  14.                 case 0: cout<<"2"; goto M1;
  15.                 case 1: cout<<"2"; goto M1;
  16.                 case 2: cout<<"0"; goto M1;
  17.             }
  18.             break;
  19.         }
  20.         case 1:{
  21.             switch(y){
  22.                 case 0: cout<<"1"; goto M1;
  23.                 case 1: cout<<"0"; goto M1;
  24.                 case 2: cout<<"2"; goto M1;
  25.             }
  26.             break;
  27.         }
  28.         case 2:{
  29.             switch(y){
  30.                 case 0: cout<<"1"; goto M1;
  31.                 case 1: cout<<"2"; goto M1;
  32.                 case 2: cout<<"0"; goto M1;
  33.             }
  34.             break;
  35.         }
  36.     }
  37.     getch();
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement