Write a C# Console Application program to print odd numbers between 1 to 100 using for loop.
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
static void Main(string[] args) { for (int i = 1; i <= 100; i++) { if(i%2==1) { Console.WriteLine(i); } } Console.ReadKey(); } |