SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "f.h"
  4.  
  5. void f(unsigned int n, double *array)
  6. {
  7.         unsigned int i, j;
  8.         double buffer;
  9.  
  10.         for( i = 0; i<(unsigned int)((n + 1)/2); i++ )// Выбор номера четного элемента
  11.         {
  12.                 for( j = 0; j<i; j++ )
  13.                 {
  14.                         buffer = array[2*i - j];
  15.                         array[2*i - j] = array[2*i - 1 - j];
  16.                         array[2*i - 1 - j] = buffer;
  17.                 }
  18.         }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top