Facebook
From dsa, 9 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 517
  1. // to jest dodawanie.cpp
  2. #include "nagl.hpp"
  3. int a,b,d;
  4. void dodawanie()
  5. {
  6.     extern int a,b,d;
  7.     cout<<"Podaj liczby które chcesz dodac:";
  8.     cin>>a>>b;
  9.     d=a+b;
  10.     cout<<"Wynik:"<<d;
  11. }
  12.  
  13.  
  14. //to jest odejmowanie.cpp
  15. #include "nagl.hpp"
  16. void odejmowanie()
  17. {
  18.     extern int a,b,d;
  19.     cout<<"Podaj liczby które chcesz dodać:";
  20.     cin>>a>>b;
  21.     d=a-b;
  22.     cout<<"Wynik:"<<d;
  23. }
  24.  
  25.  
  26.  
  27. // to nagl.hpp
  28. #ifndef NAGL_HPP_INCLUDED
  29. #define NAGL_HPP_INCLUDED
  30. #include <iostream>
  31. using namespace std;
  32. void dodawanie();
  33. void odejmowanie();
  34.  
  35. #endif // NAGL_HPP_INCLUDED
  36.