Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lab0 {
- public static void main(String args[]){
- int[] k = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2};
- float[] x = new float[18];
- float[][] c = new float[8][18]
- for (int i=0; i<k.length; i++){
- System.out.println(k[i]);
- }
- for (int i=0; i<x.length; i++) {
- x[i] = (float) Math.random();
- }
- for (int i=0; i<x.length; i++){
- System.out.println(x[i]);
- }
- for (int i=0; i<c.length; i++){
- for (int j = 0; j < c[0]; j++){
- switch (k[i]){
- case 12:
- c[i][j] = Math.sin(Math.pow((x[j]+1) * Math.pow(x[j], x[j])/3));
- break;
- case 2:
- case 4:
- case 10:
- case 16:
- c[i][j] = Math.cos(Math.atan(1/Math.pow(Math.E,Math.abs(x[j]))));
- break;
- default:
- c[i][j] = Math.pow(0,5/Math.pow(2 * Math.atan(Math.pow(x[j]-0.5/19,2)), 3),Math.asin(Math.pow(1/Math.pow(Math.E, Math.abs(x[j])))))
- }
- }
- }
- /**/
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement