Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- void pokazTablice( int t[], int n )
- {
- for( int i = 0; i < n; ++i )
- cout << t[ i ] << " ";
- cout << endl;
- }
- void wypelnij( int wzorzec, int t[], int n )
- {
- for( int i = 0; i < n; t[ i++ ] = wzorzec )
- ;
- }
- void zeruj( int t[], int n )
- {
- wypelnij( 0, t, n );
- }
- // Minimum
- // Maksimum
- // Suma
- // Średnia
- int main()
- {
- const int N = 10;
- int tab[ N ];// = { 0, 0, 0, 0, 0 };
- //for( int i = 0; i < N; ++i )
- // tab[ i ] = 0;
- zeruj( tab, N );
- pokazTablice( tab, N );
- cout << "\nRozmiar tablicy w bajtach: " << sizeof( tab );
- cout << "\nRozmiar tablicy w elementach: " << sizeof( tab ) / sizeof( tab[0] );
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement