Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5. void recznie(int n,int a[])
  6. {
  7. int l;
  8. cout << "Podaj liczby ciagu:";
  9.  
  10. for (int i = 0; i < n; i++)
  11. {
  12. cin >> l;
  13. a[i] = l;
  14. // cout << a[i] << " ";
  15. }
  16. }
  17. (...)
  18. const int N=1000;
  19. int main()
  20. {
  21.  
  22. int wybor, n, a[N];
  23. cout<<"podaj wielkosc ciagu: ";
  24. cin>>n;
  25. cout<<"Jak wygenerowac ciag??"<<endl<<"1: Recznie wprowadzane wyrazy ciagu"<<endl<<"2: Losowanie danej ilosc wyrazow ciagu"<<endl<<"wybor: ";
  26. cin>>wybor;
  27. /* int i,najwiekszy,najmniejszy,a[n],ww,wn;
  28. int poczatek,koniec; */ // <-na chuj ten kaktus? xD
  29. switch(wybor)
  30. {
  31. case 1:
  32. {
  33. recznie(n, a);
  34. break;
  35. }
  36. case 2:
  37. {
  38. losowo(a,n);
  39. break;
  40. }
  41. (...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement