From f2c0d76b3f1a433af2d9b9a358ed955b08446976 Mon Sep 17 00:00:00 2001 From: sashadatsko <57771806+sashadatsko@users.noreply.github.com> Date: Wed, 13 Jul 2022 12:02:32 +0300 Subject: [PATCH 1/2] update on .gitignore Signed-off-by: sashadatsko <57771806+sashadatsko@users.noreply.github.com> --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index cba7efc..a1c47f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ a.out + +somefile1 +somefile2 \ No newline at end of file From 6419b8f6257fdbb988cda49f340bab6c1bf604a5 Mon Sep 17 00:00:00 2001 From: sashadatsko <57771806+sashadatsko@users.noreply.github.com> Date: Wed, 13 Jul 2022 12:03:52 +0300 Subject: [PATCH 2/2] update on main.cpp Signed-off-by: sashadatsko <57771806+sashadatsko@users.noreply.github.com> --- main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index bfc97fa..7bc3045 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,10 @@ #include +int add(int a, int b) +{ + return a + b; +} + int main() { int a; @@ -11,7 +16,7 @@ int main() std::cout << "b: "; std::cin >> b; - std::cout << a << " + " << b << " = " << a + b << std::endl; + std::cout << a << " + " << b << " = " << add(a, b) << std::endl; return 0; }