Write a program that takes as input and then prints out the
Write a program that takes as input and then prints out the numbers from the sequence. N: 5 Sequence: 6 13 32 69 130
Solution
using System;
class Program
{
static void Main()
{
int i,n = 5;
Console.WriteLine(\"Sequence : \");
for(i=1;i<=n;i++)
{
Console.Write((i*i*i+5)+\"\\t\"); // term = i*i*i +5
}
}
}
output:
Sequence :
6 13 32 69 132
