Hi everyone, im new here
I just started to learn about C#
Here is my question
Trying to make an Console Application that counts number from 1 to 50 and at the output show's me *-for inpar and **-par
output must be like this
*
**
*
**
*
**
*
Please help.
Thanks

Shweta LodhaRank #31 · 39.8K reputationPosted Feb 5, 2014, 11:30 AM EST
static void Main(string[] args)
{
for (int i = 1; i < 51; i++)
{
if(i%2==0)
Console.WriteLine("**");
else
Console.WriteLine("*");
}
Console.ReadLine();
}
Shweta LodhaRank #31 · 39.8K reputationPosted Feb 5, 2014, 11:15 AM EST
Guest User28 reputationPosted Feb 5, 2014, 11:23 AM EST
impar number like 1 3 5 7
and par like 2 4 6 8
Guest User28 reputationPosted Feb 5, 2014, 11:36 AM EST
Shweta LodhaRank #31 · 39.8K reputationPosted Feb 5, 2014, 11:37 AM EST