dllbridge

Untitled

Apr 14th, 2026
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.41 KB | None | 0 0
  1.  
  2.  
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <iostream>
  6. using namespace std;
  7.  
  8. int a;
  9.  
  10. bool Flag = 1;
  11.  
  12.  
  13. //////////////////////////////////////////////////
  14. int main()
  15. {
  16.     srand(time(0));
  17.     setlocale(LC_ALL, "rus");
  18.     int n = rand()%101;
  19.  
  20.     cout << "я загадала число "  << endl;
  21.     cout << "введите число:";   cin >> a;
  22.     cout << "я загадала число " << n << " ввели число:" << a << endl;
  23.    
  24.   //  cout << n << endl;
  25.    
  26.    
  27.      if(n - a > 20)
  28.      {
  29.    
  30.         cout << "Очень далеко "<< endl;
  31.        
  32.         goto L_01;
  33.        
  34.      }
  35.  
  36.      if(a - n > 20)
  37.      {
  38.    
  39.         cout << "Очень далеко "<< endl;
  40.        
  41.         goto L_01;
  42.      }
  43.      //////////////////////////////
  44.      if(n - a > 10)
  45.      {
  46.    
  47.         cout << "Средне "<< endl;
  48.        
  49.         goto L_01;
  50.        
  51.      }
  52.  
  53.      if(a - n > 10)
  54.      {
  55.    
  56.         cout << "Средне  "<< endl;
  57.        
  58.         goto L_01;
  59.      }    
  60.  
  61.      //////////////////////////////
  62.      if(n - a > 5)
  63.      {
  64.    
  65.         cout << "Рядом "<< endl;
  66.        
  67.         goto L_01;
  68.        
  69.      }
  70.  
  71.      if(a - n > 5)
  72.      {
  73.    
  74.         cout << "Рядом  "<< endl;
  75.        
  76.         goto L_01;
  77.      }      
  78.        
  79.  
  80.      cout << "Другой вариант"<< endl;
  81.  
  82. L_01: return 0;
  83. }
  84.  
  85.  
  86.  
Advertisement
Add Comment
Please, Sign In to add comment