Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //main.cpp
- //
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int ReadNumber();
- void WriteAnswer(int sum);
- int main()
- {
- int num1 = ReadNumber();
- int num2 = ReadNumber();
- int sum = num1 + num2;
- WriteAnswer(sum);
- }
- //io.cpp
- //
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int ReadNumber()
- {
- int num;
- cout<<"Please, enter your a number "<<endl;
- cin>>num;
- return num;
- }
- void WriteAnswer(int sum)
- {
- cout<<"The sum of your inputted numbers is "<<sum<<endl;
- }
- //io.h
- //
- //
- #ifndef WRFUNC_H
- #define WRFUNC_H
- int ReadNumber();
- void WriteAnswer(int sum);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment