Advertisement
MikecIT

Funkcije - 15.

Dec 7th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. int insert(float x[], int *n, int ind, int p, int dim)
  2. {
  3.     if(ind<0||ind>dim-1)
  4.         {
  5.             *n=dim;
  6.             return 0;
  7.         }
  8.     int i;
  9.     (*n)=dim+1;
  10.     for(i=(*n)-1;i>ind;i--) x[i]=x[i-1];
  11.     x[ind]=p;
  12.     return 1;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement