Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int w=0,k=0;
- int fool(int tab,int w,int k)
- {
- int a=1,b=100;
- for(int i=0;i<w;i++){
- for(int j=0;j<k;j++){
- tab[i][j]=a+rand()%(b-a+1);
- }
- }
- }
- int main()
- {
- srand(time(NULL));
- int tab[w][k];
- cout << "Podaj ilosc wierszy: " << endl;
- cin >> w;
- cout << "Podaj ilosc kolumn: " << endl;
- cin >> k;
- fool(tab,w,k);
- return 0;
- }
Add Comment
Please, Sign In to add comment