Code using C#
Write a program that outputs “Welcome” five times
using System;
public class Program
{
public static void Main()
{
for (int i=1; i<=5; i++) //Loop
repeats 5 times and executes the loop block every time
{
Console.WriteLine("Welcome");
}
}
}
Output:
Welcome
Welcome
Welcome
Welcome
Welcome
Get Answers For Free
Most questions answered within 1 hours.