#include <iostream>
using namespace std;
// GRUPA A SPECJALNIE DLA ANGELIKI EM OD BARTŁOMIEJA EL ZAD 2
int const nmax=10;
void WYPELNIJDWOJKAMI(int tab[][nmax], int &k, int&w);
void sredniaKOLUMNAMI(int tab[][nmax], int &k, int&w,int sr[nmax]);
void wsywietl(int tab[][nmax], int &k, int&w);
int main()
{
int tab[nmax][nmax];
int sr[nmax];
int k,w;
WYPELNIJDWOJKAMI(tab,k,w);
wsywietl(tab,k,w);
sredniaKOLUMNAMI(tab,k,w,sr);
return 0;
}
void WYPELNIJDWOJKAMI(int tab[][nmax], int &k, int&w)
{
cout<<"Podaj wiersze";
cin>>w;
cout<<"kolyumny";
cin>>k;
for(int i=0; i<w; i++)
{
for(int j=0; j<k; j++)
{
tab[i][j]=2;
}
}
}
void sredniaKOLUMNAMI(int tab[][nmax], int &k, int&w,int sr[nmax])
{
int suma;
for(int i=0; i<k; i++)
{
suma=0;
for(int j=0; j<w; j++)
{
suma=suma+tab[j][i];
}
sr[i]=suma/w;
cout<<"srednia kolumny "<<i<<" wynosi: "<<sr[i]<<endl;
}
}
void wsywietl(int tab[][nmax], int &k, int&w)
{
for(int i=0; i<w; i++)
{
for(int j=0; j<k;j++)
{
cout<<tab[i][j]<<" ";
}
cout<<endl;
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}