nodejs- flipping algorithm
1 / * * 2 * the Created by Moon ON 2019/12/14. 3 * / 4 // program must be run to complete the output statement, this tool can display the results of running properly. . 5 . 6 . 7 function ABC () . 8 { . 9 var n-= 50 ; 10 var the min_n = n-/ 2 ; . 11 var max =. 9 ; 12 is for ( var I = 0; I <max; I ++ ) 13 is { 14 var left max = / 2 ; 15 16 IF (I < left) . 17 { 18 var abc = (max - i); 19 20 var bag = - (abc * n - left * n) + min_n; //偏移25 21 22 console.log("hello " + bag); 23 } 24 else 25 { 26 var bag = (i * n - left * n) + min_n; //偏移25 27 28 console.log("hello " + bag); 29 } 30 } 31 } 32 33 abc();