MichalWalczak

Zad 8 TABLICE

Apr 18th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <time.h>
  4. using namespace std;
  5. int main()
  6. {
  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.     cout<<"TAB"<<i<<"="<<tablica[i]<<endl;
  14. }
  15.     return 0;
  16. }
Add Comment
Please, Sign In to add comment