Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- // tablice
- int tablica[4]; // to jest deklaracja czteroelementowej tablicy typu int
- tablica[0] = 5;
- tablica[1] = 12;
- tablica[2] = 7;
- tablica[3] = 18; // UWAGA: tablica czteroelementowa jest numerowana od 0 do 3!
- // wypisanie na ekran całej tablicy za pomocą pętli for:
- for(int i = 0; i < 4; ++i)
- cout << tablica[i] << '\t';
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement