Tech News, Huawei stock ROMs / firmware, Infinity Box Chinese Miracle 2 MTK v 1.58 setup, D&G Unlocker Tools "Bypass FRP Lock" Full Setup Installer Free, Dream league soccer apk+data download, Ultimate Multi Tool GSM v Setup, Huawei FRP Lock Bypass Tool Software Latest Version Free, True Smart Max 4.0 Plus unlock sim all, Itel 5020 Stock Firmware, GTA Vice City Ultra Compressed from 1.38 GB to 257 mb for Android, How To Unbrick Qualcomm Android Devices

program to print sum of series in C# using loops

program to print sum of series in C# using loops - How are you, friend? welcome to our blog super full Tech News, well now we will discuss the information you find on the search engines like google and other information that will we say this time is program to print sum of series in C# using loops, we always strive to show you the complete information for you, all right please see:

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();
}




Information about the program to print sum of series in C# using loops we have conveyed

A few of our information about the program to print sum of series in C# using loops, I hope you can exploit carefully

You have finished reading program to print sum of series in C# using loops and many articles about Tech News in our blog this, please read it. and url link of this article is https://hibbydabby.blogspot.com/2013/12/program-to-print-sum-of-series-in-c.html Hopefully discussion articles on provide more knowledge about the world of new tech gadgets and tech news.

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

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

0 komentar:

Post a Comment