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 LodhaPosted Feb 5, 2014, 4:30 PM
static void Main(string[] args)
{
for (int i = 1; i < 51; i++)
{
if(i%2==0)
Console.WriteLine("**");
else
Console.WriteLine("*");
}
Console.ReadLine();
}
Shweta LodhaPosted Feb 5, 2014, 4:37 PM
Guest UserPosted Feb 5, 2014, 4:36 PM
Guest UserPosted Feb 5, 2014, 4:23 PM
impar number like 1 3 5 7
and par like 2 4 6 8
Shweta LodhaPosted Feb 5, 2014, 4:15 PM