Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement