Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. //siema to ja spejson tu masz nasz programik
  2. #include <iostream>
  3. #include <cstdio>
  4.  
  5. using namespace std;
  6.  
  7. void wypelnij(char x, char tab[][9])
  8. {
  9. for(int i=0; i<9; i++)
  10. for(int j=0; j<9; j++)
  11. {
  12. cin >> tab[i][j];
  13.  
  14. }
  15. }
  16.  
  17.  
  18. void wypisz(char x, char tab[][9])
  19. {
  20. for(int i=0; i<9; i++)
  21. {
  22. for(int j=0; j<9; j++) cout << setw(3) << tab[i][j];
  23.  
  24. cout << endl;
  25. }
  26. cout << endl;
  27. }
  28.  
  29.  
  30. int main()
  31. {
  32. char tab[9][9];
  33. char x;
  34. setlocale(LC_CTYPE, ".1250");
  35.  
  36. cout << "celem gierki jest trafienie statku na polu 10x10 masz 10 pocisków powodzenia";
  37.  
  38. wypelnij(x, tab)
  39. wypisz(x, tab)
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement