Guest User

Untitled

a guest
May 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include<cstdio>
  2. #include<iostream>
  3.  
  4. #include<cmath>
  5. using namespace std;
  6.  
  7. void zapelnij (int tab[5])
  8. {
  9. for (int i=0;i<5; i++)
  10. {
  11. tab[i]=rand()%10;
  12. }
  13. }
  14.  
  15. void wyswietl (int tab[5])
  16. {
  17. for (int i=0;i<5;i++)
  18. {
  19. cout<<tab[i]<<" ";
  20. }
  21. }
  22.  
  23.  
  24.  
  25.  
  26.  
  27. int main()
  28. {
  29.    
  30.    srand(time(NULL));
  31.    int tab[5];
  32.    zapelnij(tab);
  33.    wyswietl(tab);
  34.    
  35.    
  36.    
  37.    
  38.    
  39.    
  40.    
  41.    
  42.    
  43. cin.ignore;
  44. getchar();
  45. return 0;    
  46. }
Add Comment
Please, Sign In to add comment