Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <iomanip>
- #include<time.h>
- using namespace std;
- void losowa_liczba() //da sie wstawic to w tabele?
- {
- srand( time( NULL ) );
- printf( "Wylosowano %d\n", rand() );
- }
- int main()
- {
- losowa_liczba();
- int tabA[4][3]={{losowa_liczba()},{4,5,5},{23,4,5},{21,42,53}}; //wydaje mi sie ze jest zla zmienna i nie widzi "liter" //napisu losowa_liczba. ja zrobic zeby stworzyc tablice, ktora wypelnia sie dowolnymi liczbami?
- for (int i = 0; i<4; i++){
- for(int j =0 ; j<3 ;j++)
- cout << setw(10) << tabA[i][j];
- cout << endl<<endl;
- }
- //losowa_liczba(),losowa_liczba(),losowa_liczba()
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement