prog.cpp: In function ‘int suma()’:
prog.cpp:14:4: error: ‘tab’ was not declared in this scope
tab[i] = losowanie();
^~~
prog.cpp:22:18: error: ‘tab’ was not declared in this scope
suma = suma + tab[i];
^~~
prog.cpp: At global scope:
prog.cpp:29:10: error: two or more data types in declaration of ‘main’
int main() {
^