Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int n;
  5.  
  6. void WprowadzDane()
  7. {
  8. int n;
  9. cout << "Podaj ilosc elementow tablicy: ";
  10. cin >> n;
  11.  
  12. int tablica[n];
  13. cout << "Podaj elementy do tablicy: ";
  14. for (int i=0;i<n; i++)
  15. {
  16. cin >> tablica[i];
  17. }
  18.  
  19. }
  20. void WyprowadzenieDanych()
  21. {
  22.  
  23. for (int i=0;i<n; i++)
  24. {
  25. cout << "Element " << i << "tablicy";
  26. cout << tablica[i];
  27. }
  28. }
  29.  
  30.  
  31. int main()
  32. {
  33.  
  34.  
  35.  
  36.  
  37. WprowadzDane();
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement