fork(1) download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main (int arqc, char * argv [])
  7. {
  8. int tab[3][3];
  9. int v;
  10. //wprowadzanie
  11. for (int i = 0; i < 2; i++) {
  12. for (int j = 0; j < 2; j++) {
  13. cout << "Podaj tab [" << i << "][" << j << "]=";
  14. cin >> v;
  15. tab[i][j] = pow(v, 2);
  16. }
  17. }
  18. for (int i = 0; i < 2; i++) {
  19. for (int j = 0; j < 2; j++) {
  20. cout << "tab[" << i << "][" << j << "] = " << tab[i][j] << endl;
  21. }
  22. }
  23. system("PAUSE");
  24. return 0;
  25. }
Success #stdin #stdout #stderr 0s 3464KB
stdin
5
10
15
20

stdout
Podaj tab [0][0]=Podaj tab [0][1]=Podaj tab [1][0]=Podaj tab [1][1]=tab[0][0] = 25
tab[0][1] = 100
tab[1][0] = 225
tab[1][1] = 400
stderr
sh: 1: PAUSE: not found