Advertisement
dllbridge

Untitled

Feb 24th, 2025 (edited)
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.70 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6.  
  7. ///////////////////////////////////////////////////////
  8. int main()
  9. {
  10.  
  11.  
  12.     float f = 1.37;
  13.    
  14.     printf("f = %.2f\n", f);
  15.  
  16. }
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. /*
  25.  
  26. #include   <stdio.h>
  27.  
  28.  
  29.  
  30. ///////////////////////////////////////////////////////
  31. int main()
  32. {
  33.  
  34.  
  35.     int n = -6;
  36.    
  37.     char sz[99] = "SONY";
  38.  
  39.  
  40.  
  41.     printf("sz = %s, n = %d\n", sz, n);
  42.          
  43.    
  44. }
  45.  
  46. */
  47.  
  48.  
  49.  
  50.  
  51. #include   <stdio.h>
  52.  
  53.  
  54.  
  55. ///////////////////////////////////////////////////////
  56. int main()
  57. {
  58.  
  59.  
  60.     int n = -6;
  61.  
  62.     while(n < 10)
  63.     {
  64.          printf("n  =  %3d\n", n);
  65.          n = n + 1;
  66.     }    
  67.          
  68.              
  69.    
  70. }
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. /*
  78.  
  79.  
  80. #include   <stdio.h>
  81.  
  82.  
  83.  
  84. ///////////////////////////////////////////////////////
  85. int main()
  86. {
  87.  
  88.  
  89.     int n = 0;
  90.  
  91. L_01:
  92.          printf("n  =  %2d\n", n);
  93.          n = n + 1;
  94.          
  95.          
  96.          if(n < 10) goto L_01;
  97.    
  98. }
  99.  
  100. */
  101.  
  102.  
  103.  
  104.  
  105.  
  106. /*
  107.  
  108. #include   <stdio.h>
  109.  
  110.  
  111.  
  112. ///////////////////////////////////////////////////////
  113. int main()
  114. {
  115.  
  116.  
  117.    
  118.  
  119.     for(int n = 9; n < 20; n = n + 2)
  120.     {
  121.        
  122.          printf("n  =  %2d\n", n);  
  123.     }
  124. }
  125.  
  126.  
  127.  
  128. */
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. /*
  140. #include   <stdio.h>
  141.  
  142.  
  143.  
  144. ///////////////////////////////////////////////////////
  145. int main()
  146. {
  147.  
  148.  
  149.     int n = 10;
  150.  
  151.     for(;;)
  152.     {
  153.        
  154.          printf("n  =  %d\n",  n);  
  155.          
  156.          n++;
  157.          
  158.          if(n == 20) break;
  159.     }
  160. }
  161.  
  162.  
  163. */
  164.  
  165.  
  166.  
  167. /*
  168. #include   <stdio.h>
  169.  
  170. char sz[99] = "77 = %3d\n";
  171.  
  172. ///////////////////////////////////////////////////////
  173. int main()
  174. {
  175.    
  176.     int n = 123;
  177.                
  178.     printf(sz, 27);    
  179.     printf("n  =  %d\n",  n);  
  180. }
  181. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement