如何找出由array of Integer?定义的某个动态数组的最小值和最大值?
例如:
Y: array of integer;
Run Code Online (Sandbox Code Playgroud) 我最近写了一个计算机科学考试,他们要求我们给出 cos 泰勒级数展开式的递归定义。这是系列
cos(x) = 1 - x^2/2!+ x^4/4!+ x^6/6!...
函数签名如下所示
float cos(int n , float x)
Run Code Online (Sandbox Code Playgroud)
其中 n 表示用户想要计算的系列中的数字, x 表示 cos 函数中 x 的值
我显然没有正确回答这个问题,过去几天我一直在试图弄清楚,但我遇到了砖墙
有没有人能帮我从某个地方开始?
我想从字符串值中删除空格.例如,sString := 'Hello my name is Bob应该成为sString := 'HellomynameisBob.
我尝试使用while循环:
iPos := pos(' ', sString);
while iPos > 0 do
Delete(sString,iPos,1);
Run Code Online (Sandbox Code Playgroud)
但程序只是冻结了.