Advertisement
patryk178

Untitled

Oct 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. void funkcja(int tab[])
  6. {
  7. for(int i=0;i<6;i++)
  8. {
  9. tab[i] = rand()%15+5;
  10. }
  11. }
  12.  
  13. float funkcja(float tab[])
  14. {
  15. for(int i=0;i<6;i++)
  16. {
  17. cin>>tab[i];
  18. }
  19. }
  20.  
  21. int main()
  22. {
  23. int tab[6];
  24. float tab1[6];
  25. funkcja(tab);
  26.  
  27. for(int i=0;i<6;i++)
  28. {
  29. cout<<tab[i]<<endl;
  30. }
  31.  
  32. cout<<"----------------------------------------------------\n";
  33.  
  34. funkcja(tab1);
  35.  
  36. for(int i=0;i<6;i++)
  37. {
  38. cout<<tab1[i]<<endl;
  39. }
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement