From 8097cb33a27626c93da45309c0f3c42ee313c952 Mon Sep 17 00:00:00 2001 From: IlyaKruglov Date: Sat, 16 Nov 2019 15:54:58 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=20Test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/task1.h | 1 + src/main1.cpp | 14 ++++++++++++++ src/task1.cpp | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 include/task1.h create mode 100644 src/main1.cpp create mode 100644 src/task1.cpp diff --git a/include/task1.h b/include/task1.h new file mode 100644 index 0000000..d393f16 --- /dev/null +++ b/include/task1.h @@ -0,0 +1 @@ +int ageCheck(int age); \ No newline at end of file diff --git a/src/main1.cpp b/src/main1.cpp new file mode 100644 index 0000000..306581d --- /dev/null +++ b/src/main1.cpp @@ -0,0 +1,14 @@ +#include "tasl1.h" +#include + +int main () +{ + int age=0; + printf ("How old are you? "); + scanf ("%d", &age); + if (result==1) + printf ("Access garanted!\n"); + else + printf ("Access denied!\n"); + return 0; +} diff --git a/src/task1.cpp b/src/task1.cpp new file mode 100644 index 0000000..1c3b244 --- /dev/null +++ b/src/task1.cpp @@ -0,0 +1,8 @@ +#include "task1.h" +int int ageCheck(int age) +{ + if (age>=18) + return 1; + else + return 0; +} From c5f51fe6e596dde4c1debfd0168003c66a101208 Mon Sep 17 00:00:00 2001 From: IlyaKruglov <57134361+ilyakruglov@users.noreply.github.com> Date: Sat, 30 Nov 2019 17:34:08 +0300 Subject: [PATCH 2/2] Update task1.cpp --- src/task1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task1.cpp b/src/task1.cpp index 1c3b244..2a04448 100644 --- a/src/task1.cpp +++ b/src/task1.cpp @@ -1,5 +1,5 @@ #include "task1.h" -int int ageCheck(int age) +int ageCheck(int age) { if (age>=18) return 1;