SHARE
TWEET

Untitled

MAT4m Jan 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main(int argc , char *argv[])
  4. {
  5.     int a,b,c,d,e,f,g,i,j,k,l,swap;
  6.     int A[5];
  7.     int B[5];
  8.  
  9.  
  10.     for(i=0;i<5;i++)
  11.     {
  12.         A[i]=atoi(argv[i+1]);
  13.     }
  14.     for(i=0;i<4;i++)
  15.     {
  16.         for(j=0;j<4-i;j++)
  17.         {
  18.             if(A[j]>A[j+1])
  19.             {
  20.                 swap=A[j];
  21.                 A[j]=A[j+1];
  22.                 A[j+1]=swap;
  23.             }
  24.         }
  25.     }
  26.     printf("\n Posegregowane");
  27.     for(i=0;i<5;i++)
  28.     {
  29.  
  30.         printf("%d ",A[i]);
  31.     }
  32.     return 0;
  33. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top