SHARE
TWEET

Untitled

a guest Apr 25th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. #include <cstdlib>
  5.  
  6. using namespace std;
  7.  
  8. /*
  9. void sort (int tab[], int n){
  10.     for( int i = 0; i < n; i++ ){
  11.         for( int j = 0; j < n - 1; j++ ){
  12.              if(tab[i]>tab[i+1]){
  13.                 int bufor = tab[i];
  14.                 tab[i]=tab[i+1];
  15.                 tab[i+1]=bufor;
  16.              }i++;
  17.        
  18.         cout << tab[i]<<endl;}
  19.     }
  20. }
  21. */
  22. int main()
  23. {
  24.   srand( time( NULL ) );
  25.   int n,i;
  26.   cout << "Podaj liczbe ciongu tablicy:";cin>>n;
  27.   //int tab[n];
  28.   for(i=0;i<=n;i++){
  29.       /*tab[i] = rand()%50+1;
  30.       cout << tab[i]<<endl;*/
  31.       cout << i+7<<endl;
  32.   }
  33.   //sort(tab,n);
  34.  
  35. }
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