Hello Guyz,
i need your help , the output should be like this;
11111
2222
333
44
5
here is my code:
C#
int x;
int y;
for (x = 1; x <= 5; x++)
{
for (y = 1; y <= x; y++)
Console.Write(x);
Console.Write("\n");
}Hello Guyz,
i need your help , the output should be like this;
11111
2222
333
44
5
here is my code:
int x;
int y;
for (x = 1; x <= 5; x++)
{
for (y = 1; y <= x; y++)
Console.Write(x);
Console.Write("\n");
}Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Oct 29, 2021, 12:53 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Oct 29, 2021, 1:25 AM EDT
Ahmet TahaRank #3,505 · 414 reputationPosted Oct 29, 2021, 1:23 AM EDT