daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jan 17th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5.     int a[10],i;
  6.  
  7.     for (i=1; i <= 10; i++)
  8.     {
  9.         a[10]=0;
  10.         printf ("zadaj %d. cislo ",i);
  11.         scanf ("%d", &a[i]);
  12.     }
  13.     printf ("\n Vypis zadane cisla :\n ");
  14.     for (i=1; i <= 10; i++)
  15.     {
  16.         printf("%d\n",a[i]);
  17.     }
  18. return 0;
  19. }  
  20.     int bubbleSort(int a[10], int 10);
  21.     {
  22.          int i, j, vymena;
  23.  
  24.          for (i = 0; i < 10; i++)
  25.          {
  26.             for (j = 0; j < (9-i); j++)
  27.             {
  28.                 if (a[j] > a[j+1])
  29.                 {
  30.                     vymena = a[j];
  31.                     a[j] = a[j+1];
  32.                     a[j+1] = vymena;
  33.                 }
  34.             }
  35.          }
  36.     }
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