Skip to content

Commit 664553a

Browse files
authoredMar 27, 2020
Add files via upload
1 parent 8e668d9 commit 664553a

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
 

‎Other/ramdomequation.cpp

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
int main(){
5+
int max;
6+
srand(unsigned(time(NULL)));
7+
8+
double a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;
9+
float y1= 0.89608802455664;
10+
float y2=-0.083381608939051;
11+
float y3= 0.24686007793153;
12+
float y4= 0;
13+
float y5= 0.067658648473815;
14+
float y6=-0.21072103131565;
15+
float y7=0;
16+
float y8=0.048790164169432;
17+
float y9=0.13976194237516;
18+
float y10=0.17395330712344;
19+
float y11=0.13976194237516;
20+
float y12=0;
21+
float y13=0.095310179804325;
22+
float y14=0.086177696241052;
23+
float y15=0;
24+
float y16=0.086177696241052;
25+
float y17=-0.072570692834835;
26+
float y18=0;
27+
float y19=0.22020940501452;
28+
float y20=0.17980808272355;
29+
float y21=0.25084337466372;
30+
float y22=0.14606631905197;
31+
float y23=0.34629704820832;
32+
float y24=4.4841028037230;
33+
float CONSTVAL=5.94017125272043;
34+
35+
36+
for(int i=0; i<INT_MAX; i++){
37+
a=(double)rand()/(RAND_MAX);
38+
b=(double)rand()/(RAND_MAX);
39+
c=(double)rand()/(RAND_MAX);
40+
d=(double)rand()/(RAND_MAX);
41+
e=(double)rand()/(RAND_MAX);
42+
f=(double)rand()/(RAND_MAX);
43+
g=(double)rand()/(RAND_MAX);
44+
h=(double)rand()/(RAND_MAX);
45+
i=(double)rand()/(RAND_MAX);
46+
j=(double)rand()/(RAND_MAX);
47+
k=(double)rand()/(RAND_MAX);
48+
l=(double)rand()/(RAND_MAX);
49+
m=(double)rand()/(RAND_MAX);
50+
n=(double)rand()/(RAND_MAX);
51+
o=(double)rand()/(RAND_MAX);
52+
p=(double)rand()/(RAND_MAX);
53+
q=(double)rand()/(RAND_MAX);
54+
r=(double)rand()/(RAND_MAX);
55+
s=(double)rand()/(RAND_MAX);
56+
t=(double)rand()/(RAND_MAX);
57+
u=(double)rand()/(RAND_MAX);
58+
v=(double)rand()/(RAND_MAX);
59+
w=(double)rand()/(RAND_MAX);
60+
x=(double)rand()/(RAND_MAX);
61+
if(((a*y1)+(b*y2)+(c*y3)+(d*y4)+(e*y5)+(f*y6)+(g*y7)+(h*y8)+(i*y9)+(j*y10)+(k*y11)+(l*y12)+(m*y13)+(n*y14)+(o*y15)+(p*y16)+(q*y17)+(r*y18)+(s*y19)+(t*y20)+(u*y21)+(v*y22)+(w*y23)+(x*y24)) ==CONSTVAL)
62+
{
63+
cout<<"a = "<<a<<endl;
64+
cout<<"b = "<<b<<endl;
65+
cout<<"c = "<<c<<endl;
66+
cout<<"d = "<<d<<endl;
67+
cout<<"e = "<<e<<endl;
68+
cout<<"f = "<<f<<endl;
69+
cout<<"g = "<<g<<endl;
70+
cout<<"h = "<<h<<endl;
71+
cout<<"i = "<<i<<endl;
72+
cout<<"j = "<<j<<endl;
73+
cout<<"k = "<<k<<endl;
74+
cout<<"l = "<<l<<endl;
75+
cout<<"m = "<<m<<endl;
76+
cout<<"n = "<<n<<endl;
77+
cout<<"o = "<<o<<endl;
78+
cout<<"p = "<<p<<endl;
79+
cout<<"q = "<<q<<endl;
80+
cout<<"r = "<<r<<endl;
81+
cout<<"s = "<<s<<endl;
82+
cout<<"t = "<<t<<endl;
83+
cout<<"u = "<<u<<endl;
84+
cout<<"v = "<<v<<endl;
85+
cout<<"w = "<<w<<endl;
86+
cout<<"x = "<<x<<endl;
87+
break;
88+
}
89+
}
90+
}

0 commit comments

Comments
 (0)
Please sign in to comment.