Đạt Michio
New member
What will be the output of the following C# code?
A.
A
AA
AAA
AAAA
B.
A
AB
ABC
ABCD
C.
A
AA
AAA
AAAA
AAAAA
D.
A
BC
DEF
DEFG
Code:
static void Main(string[] args)
{
int n = 5;
int x = 4;
int z, c, k;
for (c = 1; c <= n; c++)
{
for (k = 1; k <= c; k++)
{
z = 3 * x * x + 2 * x + 4 / x + 8;
Console.Write(Convert.ToString(Convert.ToChar(z)));
}
Console.WriteLine("\n");
}
Console.ReadLine();
}
A
AA
AAA
AAAA
B.
A
AB
ABC
ABCD
C.
A
AA
AAA
AAAA
AAAAA
D.
A
BC
DEF
DEFG