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

 Write a program that takes as input and then prints out the numbers from the sequence. N: 5 Sequence: 6 13 32 69 130Solutionusing System; class Program { stati

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site