Advertisement
dllbridge

Untitled

Feb 27th, 2023
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.15 KB | None | 0 0
  1.  
  2.  
  3.  
  4. /*
  5. #include   <stdio.h>
  6.  
  7.  
  8.  
  9.  
  10.  
  11. int n = 7778889;
  12.  
  13. unsigned __int8 n0 = 250;  
  14.  
  15. typedef unsigned __int8 uint8;
  16.  
  17.  
  18.  
  19. uint8 n1 = 250;
  20.  
  21. //////////////////////////////////////////////////////////////////
  22. int main()                                                      //
  23. {
  24.    
  25.     for(int i = 0; i < 20; i++)
  26.     {
  27.            
  28.        
  29.         printf("n1 = %4d\n", n1);
  30.        
  31.         n1++;  
  32.        
  33.     }  
  34.  
  35. }
  36.  
  37.  
  38.  
  39.  
  40. */
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. /*
  54.  
  55. #include   <stdio.h>
  56.  
  57.  
  58.  
  59. int n = 7778889;
  60.  
  61. unsigned __int8 n1 = 250;  
  62.  
  63.  
  64. //////////////////////////////////////////////////////////////////
  65. int main()                                                      //
  66. {
  67.    
  68.     for(int i = 0; i < 20; i++)
  69.     {
  70.        
  71.         printf("n1 = %4d\n", n1);
  72.        
  73.         n1++;  
  74.        
  75.     }  
  76.  
  77. }
  78.  
  79. */
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. #include   <stdio.h>
  111. #include  <locale.h>
  112.  
  113. struct  Elem;
  114.  
  115. typedef int     Inf;
  116. typedef int     Key;
  117. typedef Elem* pElem;
  118.  
  119. ////////////////////////////////////////
  120. class Elem
  121. {
  122.    
  123.    public: Key    key;
  124.            Inf    inf;
  125.            pElem next;
  126. };
  127.  
  128.  
  129. ////////////////////////////////////////
  130. class Tabl
  131. {
  132.    
  133.    private: pElem head;  //  Таблица - указатель на начало цепочки
  134.        
  135.    public:  Tabl();
  136.             void add(Key k, Inf i);
  137.         //  void del(Key k);
  138.         //  pElem search(Key k);
  139.         //  bool empty();
  140.         //  void print();          
  141. };
  142.  
  143.  
  144. //////////////////////////////////////////////////////////////////
  145. Tabl::Tabl()                                                    //
  146. {
  147.        
  148.    printf("Создана пустая таблица\n");
  149.    head = 0;       
  150. }
  151.  
  152.  
  153. //////////////////////////////////////////////////////////////////
  154. void Tabl::add(Key k, Inf i)                                    //
  155. {
  156.    
  157.      pElem p = new Elem;
  158.      p->key = k;
  159.      p->inf = i;   
  160.      p->next = head;
  161.      head = p;
  162. }
  163.  
  164.  
  165. //////////////////////////////////////////////////////////////////
  166. int main()                                                      //
  167. {
  168.    
  169.     setlocale(LC_ALL, "rus");
  170.     Tabl T1;
  171.    
  172.                    
  173.     printf("Верные символы %d", 77);  
  174.  
  175. return 0;
  176. }
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement