C# Program toward display the different series output at the screen
Program Statement:Write a program which display the following output at the screen.
1 2 3 4 5
1 4 9 16 25
1 8 27 64 125
Solution:
static void Main(string[] args)
{
beneficial to (int i = 1; i <= 5; i++)
Console.Write(i+" ");
Console.WriteLine();
beneficial to (int i = 1; i <= 5; i++)
Console.Write(i * i+" ");
Console.WriteLine();
beneficial to (int i = 1; i <= 5; i++)
Console.Write(i * i * i+" ");
Console.ReadLine();
}