Samsung Galaxy Note, 4G LTE Plans, Transfer Photos Videos from iPhone to Samsung, Network Performance, Mobile Accounts, Furious Gold SPD TooL, Latest Version Full Setup

Info program to print sum of series in C# using loops

Info program to print sum of series in C# using loops - this blog we have built from a few years ago and already very much information about gadgets that we convey and a lot of blog visitors New Blog Techno News who are satisfied with the information, we will always try to update the latest information for you, first about Info program to print sum of series in C# using loops many already we collect data to make this article so you do not miss the news, please see:

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

You can also see our article on:


Info 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 Info program to print sum of series in C# using loops finished in discussion

hopefully the information we convey about Info program to print sum of series in C# using loops can benefit you in getting new knowledge about technology,

you just finished reading the information Info program to print sum of series in C# using loops we hope this informmation can answer the question you submit to googlle, if you want to bookmark or share please use link https://moymoycikukecik.blogspot.com/2013/12/info-program-to-print-sum-of-series-in.html and do not forget to always visit this blog to get the latest information every day.

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

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

0 komentar:

Posting Komentar