Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitb29cf210a7af3ae789e8067a88b7421dfc58e6a6 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-11-02 14:34:57 +0200
Committer
 GitHub <noreply@github.com>
2021-11-02 14:34:57 +0200
Filesf9e7d92d6f824973948adcdbe605f6a49b8bdd32
Introduction_to_programming_FMI-b29cf210a7af3ae789e8067a88b7421dfc58e6a6.tar
Introduction_to_programming_FMI-b29cf210a7af3ae789e8067a88b7421dfc58e6a6.tar.gz
Introduction_to_programming_FMI-b29cf210a7af3ae789e8067a88b7421dfc58e6a6.zip
Parentd95311d6fe0b91ee54b4629c09914e5f44a476f9 (diff)
Delete example1_no_functions.cpp
1 files changed, 0 insertions, 39 deletions
-rw-r--r--Sem. 04/example1_no_functions.cpp39
diff --git a/Sem. 04/example1_no_functions.cpp b/Sem. 04/example1_no_functions.cpp
deleted file mode 100644
index 06e6629..0000000
--- a/Sem. 04/example1_no_functions.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <iostream>
-using namespace std;
-
-
-int main()
-{
- int n;
- cin >> n;
-
- for (int i = 6; i < n; i += 6)
- {
- int firstToCheck = i - 1;
- int secondToCheck = i + 1;
-
- //prime check
- bool isFirstPrime = true;
- double temp = sqrt(firstToCheck);
- for (int j = 2; j <= temp; j++)
- {
- if (firstToCheck % j == 0)
- isFirstPrime = false;
- }
-
- if (!isFirstPrime)
- continue;
-
- //prime check
- bool isSecondPrime = true;
- double temp2 = sqrt(secondToCheck);
- for (int j = 2; j <= temp2; j++)
- {
- if (secondToCheck % j == 0)
- isSecondPrime = false;
- }
-
- if (isSecondPrime)
- cout << firstToCheck << " " << secondToCheck << endl;
- }
-} \ No newline at end of file