Tecno Android Phones, Samsung Imei Repair, Huawei Mediapad, Official Firmware/ Flash File, WiFi, Alcatel One, Flash Tool Windows, Android Jelly Bean

program to print sum of series in C# using loops

program to print sum of series in C# using loops - we say welcome to the blog Tecno Android Phones we provide a lot of latest gadget information that must be very dear for you to miss, now we will discuss first about program to print sum of series in C# using loops we have collected a lot of information to make this article to complete for you, Please read:

Articles : program to print sum of series in C# using loops
full Link : program to print sum of series in C# using loops
Article Csharp, Article programs,

You can also see our article on:


program to print sum of series in C# using loops

C# program to print sum of series

Program Statement:
Write a program to display the sum of the following series using loop.
1*x + 2*x2 + 3*x3 + 4*x4 + 5*x5 + … + n*xn

Solution:
 static void Main(string[] args)
{
int j, n = 1, x, lastn, sum = 0, prod = 1;
Console.WriteLine("Enter last digit:");
lastn=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter value of x:");
x = Convert.ToInt32(Console.ReadLine());
for (j = 1; j <= lastn; j++)
{
n = n * x;
prod = n * j;
sum = sum + prod;
}
Console.WriteLine("Sum of Series 1*x + 2*x2 + 3*x3 + 4*x4 + 5*x5 + … + n*xn when n=: " + n +" and x= "+ x+ "sum= "+ sum);
Console.ReadLine();
}




Articles about program to print sum of series in C# using loops finished discussed

We think it is enough information about program to print sum of series in C# using loops, hopefully the information we give can give benefit for you,

If you feel the information program to print sum of series in C# using loops that we provide can provide benefits for others please share with link https://southernmatron.blogspot.com/2013/12/program-to-print-sum-of-series-in-c.html thank you for visiting our blog page and do not forget to visit other pages.

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : program to print sum of series in C# using loops

1 komentar:

  1. Are you having issues when it comes to getting programming assignments drafted? IdealAssignmentHelp is here to cover all your programming assignments without any kind of glitches at all. Yes, you can get connected to their CAD Assignment Help team and make it easy for yourself to submit the respective paper within the given deadline and that too matching with the university stated instructions.

    ReplyDelete