如何编写获取输入变量并将其发送到另一个批处理文件以进行处理的批处理文件.
批次1
我不知道如何将变量发送到批处理2,这是我的问题.
批次2
if %variable%==1 goto Example
goto :EOF
:Example
echo YaY
Run Code Online (Sandbox Code Playgroud) 我的代码对数字进行阶乘,但由于某种原因,每当我输入 13 或更高的数字时,它要么给出错误的数字,要么以某种方式得到负数。有什么建议么?
List<int> myList = new List<int>();
Console.WriteLine("My Job is to take the factorial of the number you give");
Console.WriteLine("What is the number?");
string A = Console.ReadLine();
int C = Convert.ToInt32(A);
int k = C;
int B = C;
int U = C - 1;
Console.Write("{0} ", B);
while (U != 0)
{
k *= U;
Console.Write("* {0} ", U);
U--;
}
Console.WriteLine(" = {0}", k);
Console.ReadLine();
Run Code Online (Sandbox Code Playgroud)