Home > Back-end > Would you please tell me why you this for loop does not perform?
Would you please tell me why you this for loop does not perform?
Time:10-30
From the keyboard to enter a positive integer, sigma and
CodePudding user response:
Sum=sum + ((double) (I + 6)/(I + 1));//first converted to a double, otherwise (I + 6)/(I + 10) in terms of int is 0, 0 to double up (the sum is double), doesn't make sense