Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main.cpp
- ----------------------------------
- #include <iostream>
- #include "mod1.hpp"
- using namespace std;
- int main()
- {
- int a,b;
- cout<<"Podaj a: ";
- cin>>a;
- cout<<"Podaj b: ";
- cin>>b;
- cout<<a<<" + "<<b<<" = "<<suma(a,b);
- return 0;
- }
- ----------------------------------
- mod1.hpp
- ----------------------------------
- #ifndef MOD1_HPP_INCLUDED
- #define MOD1_HPP_INCLUDED
- int suma(int x, int y);
- #endif // MOD1_HPP_INCLUDED
- ----------------------------------
- mod1.cpp
- ----------------------------------
- #include "mod1.hpp"
- int suma(int x, int y)
- {
- return x+y;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement