Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit57574519b81b9e83a13ad963398634cf00d36007 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-11-02 14:35:03 +0200
Committer
 GitHub <noreply@github.com>
2021-11-02 14:35:03 +0200
Filesf0b21a433362e1f78f87c0631491e789df4500c2
Introduction_to_programming_FMI-57574519b81b9e83a13ad963398634cf00d36007.tar
Introduction_to_programming_FMI-57574519b81b9e83a13ad963398634cf00d36007.tar.gz
Introduction_to_programming_FMI-57574519b81b9e83a13ad963398634cf00d36007.zip
Parentb29cf210a7af3ae789e8067a88b7421dfc58e6a6 (diff)
Delete example1_with_functions.cpp
1 files changed, 0 insertions, 27 deletions
-rw-r--r--Sem. 04/example1_with_functions.cpp27
diff --git a/Sem. 04/example1_with_functions.cpp b/Sem. 04/example1_with_functions.cpp
deleted file mode 100644
index f33b6b9..0000000
--- a/Sem. 04/example1_with_functions.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <iostream>
-using namespace std;
-
-bool isPrime(int n)
-{
- double temp = sqrt(n);
-
- for (int i = 2; i <= temp; i++)
- {
- if (n % i == 0)
- return false;
- }
-
- return true;
-}
-
-int main()
-{
- int n;
- cin >> n;
-
- for (int i = 6; i < n; i += 6)
- {
- if (isPrime(i - 1) && isPrime(i + 1))
- cout << i - 1 << " " << i + 1 << endl;
- }
-} \ No newline at end of file