Write a program to display the numbers 1 to 14 next to one another (but with spaces in between), making use of a loop
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class ConsoleApp2
{
static void Main(string[] args)
{
for (int i = 1; i <= 14; i++)
{
Console.Write("{0} ", i);
}
Console.ReadKey();
}
}
}
Comments
Leave a comment