Current location - Training Enrollment Network - Mathematics courses - A compulsory math problem in senior three. An algorithm for finding the value of function y = {x+ 1 [x is greater than-1]-x- 1 [x is less than-1] at a given X.
A compulsory math problem in senior three. An algorithm for finding the value of function y = {x+ 1 [x is greater than-1]-x- 1 [x is less than-1] at a given X.
This is a conditional structure algorithm.
1, enter the given number from the keyboard.
2. judge the value of x a) if x >;; =- 1 execute; y=x+ 1