For ((I=1, j=1; i<=100; I++, j +=2)) Do Let "sum01 +=I "# as j values increase faster than I, so you have to in the process of testing j value is not more than 100 If [$j - lt 100]; Then Let "sum02 +=j" Fi The done Echo "sum01=$sum01" Echo "sum02=$sum02" # the results
Why in the for loop I <=100, without the operator value $if statement judgment conditions in $j <=100 with $ The two different value operator specific difference in where?
CodePudding user response:
((
Six words six words
CodePudding user response:
For it is to define the variable j value, certainly not $ The back is called variable j, with $