using System;
public class Program
{
public static void Main()
Console.WriteLine("Printing numbers from 1 to 10 using a loop:");
int i = 1; // Initialize a variable to start from 1
// Use a while loop to iterate from 1 to 10
while (i <= 10)
Console.WriteLine(i); // Print the current value of i
i++; // Increment i to move to the next number
}
Console.ReadLine(); // Keep the console window open }