Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Zhirov abef57529f chapter 1 2021-07-20 15:38:55 +03:00
3 changed files with 33 additions and 0 deletions

13
Chapter_1/io.cpp Normal file
View File

@ -0,0 +1,13 @@
#include <iostream>
int readNumber()
{
int a = 0;
std::cin >> a;
return a;
}
void writeAnswer(int a)
{
std::cout << a << std::endl;
}

7
Chapter_1/io.hpp Normal file
View File

@ -0,0 +1,7 @@
#ifndef IO_HPP_
#define IO_HPP_
int readNumber();
void writeAnswer(int);
#endif

13
Chapter_1/main.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "io.hpp"
int main()
{
int a = 0, b = 0;
a = readNumber();
b = readNumber();
writeAnswer(a + b);
return 0;
}