first comm in cpp
This commit is contained in:
1 parent
5968efc884
commit
9e742f0d79
22 files changed
+154
-1379
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
|
||||
int calculate_iter(int n)
|
||||
{
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "../1/sphenic.hpp"
|
||||
using std::string;
|
||||
bool _sphenic(int num, int cnt, int pr)
|
||||
{
|
||||
// Base case: If we have already found 3 distinct primes, check if the number is fully divided.
|
||||
@@ -40,14 +41,14 @@ bool rsphenic(int n)
|
||||
int main()
|
||||
{
|
||||
int N = 200;
|
||||
|
||||
string str;
|
||||
for (int i = 1; i < N; i++)
|
||||
{
|
||||
// printf("%d\n", i);
|
||||
|
||||
if (rsphenic(i))
|
||||
printf("%d ", i);
|
||||
}
|
||||
|
||||
str += std::to_string(i) + " ";
|
||||
};
|
||||
std::cout << str << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user