Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 09 / task1.cpp
diff options
context:
space:
mode:
1 files changed, 10 insertions, 0 deletions
-rw-r--r--pract_SI/Pract. 09/task1.cpp10
diff --git a/pract_SI/Pract. 09/task1.cpp b/pract_SI/Pract. 09/task1.cpp
new file mode 100644
index 0000000..1763817
--- /dev/null
+++ b/pract_SI/Pract. 09/task1.cpp
@@ -0,0 +1,10 @@
+bool Exist_digit(unsigned int val, unsigned int digit)
+{
+ if (val == 0)
+ return false;
+
+ if (val % 10 == digit)
+ return true;
+
+ Exist_digit(val / 10, digit)
+} \ No newline at end of file