MichalWalczak

Zad 7 TABLICE

Apr 18th, 2020
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <time.h>
  4. using namespace std;
  5.  
  6. void tabliczka(){
  7. int tablica[10];
  8. int x;
  9. srand(time(NULL));
  10. for(int i=1; i<=10; i++){
  11.     x=rand()%51+1;
  12.     tablica[i]=x;
  13. }
  14. }
  15. int main()
  16. {
  17.     tabliczka();
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment