forked from Dashark/hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuperprime.cpp
More file actions
104 lines (77 loc) · 1.19 KB
/
Copy pathsuperprime.cpp
File metadata and controls
104 lines (77 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include<iostream>
#include<math.h>
class Nature{
private:
int num;
int a,b,c;
int add,x,sqrtsum;
public:
Nature(int num);
int sum(int a,int b,int c);
int mul(int a,int b,int c);
int sqrts(int a,int b,int c);
};
Nature::Nature(int num){
a=num%10;
b=num/10%10;
c=num/100;
}
Nature::sum(int a,int b,int c){
add=a+b+c;
}
Nature::mul(int a,int b,int c){
x=a*b*c;
}
Nature::sqrts(int a,int b,int c){
sqrtsum=a*a+b*b+c*c;
}
class SuperPrime{
private:
int i;
public:
Nature sp(int i);
SuperPrime(int i,int sum,int mul ,int sqrts);
int max(int i);
int he(int i);
};
SuperPrime::SuperPrime(int i,int sum,int mul ,int sqrts){
int count=0;
for(int h=2;h<sqrt(i);h++){
if(i%h==0){
count++;
}
}
for(int h=2;h<sqrt(sum);h++){
if(sum%h==0){
count++;
}
}
for(int h=2;h<sqrt(mul);h++){
if(mul%h==0){
count++;
}
}
for(int h=2;h<sqrt(sqrts);h++){
if(sqrts%h==0){
count++;
}
}
if(count==0) {
return i;
}
else{
return 0;
}
}
SuperPrime::he(int pd){
int sum=0;
sum+=pd;
}
SuperPrime::max(int pd){
if
}
int main(){
Nature sp(i);
sp.sum;
return 0;
}