-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOkay.java
More file actions
55 lines (42 loc) · 1.58 KB
/
Okay.java
File metadata and controls
55 lines (42 loc) · 1.58 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
import static java.lang.Math.*;
public class Okay {
public static void main(String args[]) {
short[] h = new short[10];
System.out.println(h.length);
short ch = 6;
for (short j = 0; j < h.length; j++) {
h[j] = ch;
ch += 2;
System.out.println(h[j]);
}
System.out.println();
double[] x = new double[15];
for (int i = 0; i < x.length; i++) {
x[i] = ((double) (Math.random() * 15 - 3));
System.out.println(x[i]);
}
System.out.println();
double[][] f = new double[10][15];
for (int i = 0; i < f.length; i++) {
for (int j = 0; j < f[i].length; j++) {
switch ((int) h[i]){
case 22:
f[i][j] = (double) log(pow(tan(log(acos((x[j]+4.5)/15))), 2));
break;
case 10:
case 16:
case 18:
case 20:
case 24:
f[i][j] = (double) tan(asin(1 / exp( abs(x[j])) ));
break;
default:
f[i][j] = (double) log(pow(sin(pow(tan(cos(x[j])),3*pow(pow((x[j]/2),2)/2,pow((0.5/x[j]),2)))),2));
break;
}
System.out.print(f[i][j] + "\t");
}
System.out.println();
}
}
}