MrAlex

cheking

Aug 30th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. //main.cpp
  2. //
  3. //
  4. #include "stdafx.h"
  5. #include <iostream>
  6. using namespace std;
  7. int ReadNumber();
  8. void WriteAnswer(int sum);
  9.  
  10. int main()
  11. {
  12.     int num1 = ReadNumber();
  13.     int num2 = ReadNumber();
  14.     int sum = num1 + num2;
  15.     WriteAnswer(sum);
  16. }
  17.  
  18.  
  19.  
  20. //io.cpp
  21. //
  22. //
  23. #include "stdafx.h"
  24. #include <iostream>
  25. using namespace std;
  26. int ReadNumber()
  27. {
  28.     int num;
  29.     cout<<"Please, enter your a number "<<endl;
  30.     cin>>num;
  31.     return num;
  32. }
  33. void WriteAnswer(int sum)
  34. {
  35.         cout<<"The sum of your inputted numbers is "<<sum<<endl;
  36. }
  37.  
  38.  
  39.  
  40. //io.h
  41. //
  42. //
  43. #ifndef WRFUNC_H
  44. #define WRFUNC_H
  45.  
  46. int ReadNumber();
  47. void WriteAnswer(int sum);
  48. #endif
Advertisement
Add Comment
Please, Sign In to add comment