Just simply print this series
hello i am php programmer and i want to print one number series which could be start from any number and end to any number for example if i take 1-10 then my series should be like
1
10
2
9
3
8
4
7
5
6
but keep in mind that the number can be of any limit like it could be 1 to 1000 or any number of limit..
this is really so simple to print but we have some restrictions here
1. we need to use for loop only.
2. we cannot use like i+1 or 1+2 ,3 simple i++ in for loop for increment
3. we cannot use any if condition. or any other condition
4 we cannot create any another function to check the codition
5. we cannot use multiplication and division in it.
6. one more think that the series should be in array and we cannot define the array number like array(1,2,3,4,) no, only we need to use some other method from which i will only enter starting and end limit and that will return us the array. we can use inbuilt functions.
we need to follow each and every point of restriction else this will not setisfice the condition… we can print this by other methods too but need to follow all restriction..