Quote:
Originally Posted by benjaminjones
Until three, you can make them static, after that simple current number * 2;
Код:
Console.WriteLine(1);
Console.WriteLine(2);
Console.WriteLine(3);
var res = 3;
for (int i = 0; i < 7; i++)
{
res *= 2;
Console.WriteLine(res);
}
|
It's actually not multiplied by 2, it's add all previous numbers on each loop.