#property script_show_inputs
//--- 输入参数
input double InpDividentValue = 10; // 股息值
input double InpDivisorValue = 3; // 除数值
//+------------------------------------------------------------------+
//| 脚本程序起始函数 |
//+------------------------------------------------------------------+
void OnStart()
{
//--- 获取输入中输入的数字相除的实数余数
double res=MathMod(InpDividentValue,InpDivisorValue);
//--- 在日志中记录结果
PrintFormat("Real remainder when dividing %.2f by %.2f = %.2f",InpDividentValue,InpDivisorValue,res);
}
|