#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);
}
|