Advertisement
dllbridge

Untitled

Jun 12th, 2024
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.56 KB | None | 0 0
  1.  
  2.  
  3.  
  4. #include  <stdio.h>
  5.  
  6. int n  = 5;
  7.  
  8. int n2 = 3;
  9.  
  10. ///////////////////////////////////////////////
  11. int main()
  12. {
  13.    
  14.     double f = (double)n/(double)n2;
  15.    
  16.     printf("f = %.1f\n",  f);
  17.    
  18. }
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. /*
  38.  
  39. #include  <stdio.h>
  40.  
  41. int n = 77;
  42.  
  43. int *p = &n;
  44.  
  45. ///////////////////////////////////////////////
  46. int main()
  47. {
  48.    
  49.     n = (int)&p;
  50.    
  51.     printf("address p = %d\n",  n);
  52.     printf("address n = %d\n", &n);
  53. }
  54.  
  55.  
  56.  
  57. */
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. /*
  80.  
  81. #include  <stdio.h>
  82.  
  83. int n = 77,
  84.     nArr[19] = {10, 11, 12, 33};
  85.  
  86. int *p = &nArr[1];
  87.  
  88. ///////////////////////////////////////////////
  89. int main()
  90. {
  91.    
  92.     p += 5;
  93.    
  94.     n = *p;
  95.    
  96.     printf("n = %d\n", n);
  97.    
  98. }
  99.  
  100.  
  101.  
  102. */
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122. /*
  123. #include  <stdio.h>
  124. #include <string.h>
  125.  
  126.  
  127.  
  128. void  Pokedex(char*p);
  129.  
  130.  
  131. ///////////////////////////////////////////////
  132. int main()
  133. {
  134.    
  135.     char  Cat[70] ="Squirtle";
  136.    
  137.     Pokedex(&Cat[8]);
  138.     printf("%s\n",Cat);
  139. }
  140.  
  141.  
  142.  
  143.  
  144.       void  Pokedex(char*p)
  145.       {
  146.           p[0]='D';
  147.           p[1]=' ';
  148.           p[2]=' ';          
  149.           p =p+2;
  150.           p[1]='+';
  151.       }
  152.  
  153. */
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. /*
  167. #include   <stdio.h>
  168. #include  <locale.h>
  169. #include  <string.h>
  170.  
  171. #define  name n > 7
  172.  
  173. /////////////////////////////////////////////////////
  174. int main()
  175. {
  176.    
  177.     setlocale(LC_ALL, "rus");
  178.    
  179.     int n;
  180.    
  181.     printf("Введите число: ");    scanf("%d", &n);
  182.  
  183.  
  184.     if(name) printf("Верно"  );
  185.     else     printf("Неверно");
  186. }
  187.  
  188.  
  189. */
  190.  
  191.  
  192.  
  193.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement