Advertisement
dllbridge

Untitled

Dec 25th, 2024
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1.  
  2.  
  3. #include <stdio.h>
  4.  
  5.  
  6.  
  7. ////////////////////////////////////////////////
  8. int main()
  9. {
  10.    
  11.     int b     =    1,
  12.         a     =  145;
  13.    
  14.     int arr[10] = {350, 10, 50, 855, 115, 94, 95, 105, 110, 220 };
  15.  
  16.     for (int i = 0; i <= 9; i++)
  17.     {
  18.         if (arr[i] > a)
  19.         {
  20.            
  21.             arr[i] = b;
  22.        
  23.         }
  24.         printf("arr[%d] = %3d\n", i, arr[i]);
  25.      }
  26.    
  27.  
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement