Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. //ZAWARTOSC MAIN.CPP//
  2. #include <iostream>
  3. #include "naglowek.h"
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int k,l;
  10. cout << "Podaj wartosc pierwszej i drugiej liczby: ";
  11. cin >>k; cin >> l;
  12.  
  13. cout << "Suma podanych liczb wynosi:\n"<< dodaj(k,l);
  14. return 0;
  15. }
  16.  
  17. //ZAWARTOSC DZIALANIA.CPP//
  18.  
  19. #include "naglowek.h"
  20.  
  21. int dodaj(int pierwszaliczba, int drugaliczba)
  22. {
  23. return (pierwszaliczba + drugaliczba);
  24. }
  25.  
  26. //ZAWARTOSC naglowek.h//
  27.  
  28. #ifndef NAGLOWEK_H_INCLUDED
  29. #define NAGLOWEK_H_INCLUDED
  30. int dodaj(int pierwszaliczba, int drugaliczba);
  31.  
  32. #endif // NAGLOWEK_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement