Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int postac;
  4.  
  5. void move(int x, int y) {
  6.     postac += x;
  7.     return;                 // zwraca 'nic' i kończy funkcje
  8.     postac += y;
  9. }
  10.  
  11.  
  12. int dodawanie(int x, int y) {   // argumenty funkcji - x i y
  13.     int wynik = x + y;
  14.     return wynik;
  15. }
  16.  
  17.  
  18. // Jeżeli piszesz ten sam kod drugi raz to napisz funkcje która ten kod realizuje
  19.  
  20. using namespace std;
  21.  
  22. namespace nauka {
  23.     int x;
  24.     int y;
  25. }
  26.  
  27. namespace stdd {
  28.     void cout();    // deklaracja
  29.  
  30.     void cout() {   //definicja
  31.        "chuj Ci w dupe";
  32.     }
  33. }
  34.  
  35. void main() {
  36.  
  37.     int wynik;
  38.     wynik = dodawanie(5, 2);
  39.     std::cout << wynik;
  40.  
  41.  
  42.     std::cin.get();
  43.     std::cin.get();
  44.  
  45.     return  ;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement