标签:ar for sp on c amp ad line r
class Program
{
static void Main(string[] args)
{
int a = int.Parse(Console.ReadLine());
int b = int.Parse(Console.ReadLine());
a = a < 0 ? -a : a;
int c = 0;
for (int i = 1; i <= a; i++)
{
c += b;
}
if (a < 0 && b < 0)
{
c = -c;
}
Console.WriteLine(c);
Console.Read();
}
}
标签:ar for sp on c amp ad line r
原文地址:http://www.cnblogs.com/wangyuxin/p/3989804.html