Почему массив выходит с новой строки? - C#
Формулировка задачи:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace sqrt
{
class Program
{
static void Main(string[] args)
{
int[,] sqrs ={
{1,1},
{2,4},
{3,9},
{4,16},
{5,25},
{6,36},
{7,49},
{8,64},
{9,91},
{10,100},
};
int i, j;
for (i = 0; i < 10; i++)
{
for (j = 0; j < 2; j++)
{
Console.WriteLine(sqrs[i, j] + "");
Console.WriteLine();
}
}
}
}
}Решение задачи: «Почему массив выходит с новой строки?»
textual
Листинг программы
static void Main(string[] args)
{
int[,] sqrs ={
{1,1},
{2,4},
{3,9},
{4,16},
{5,25},
{6,36},
{7,49},
{8,64},
{9,91},
{10,100},
};
int i, j;
for (i = 0; i < 10; i++)
{
for (j = 0; j < 2; j++)
{
Console.Write(sqrs[i,j]);
Console.Write(" ");
}
Console.WriteLine();
}
}