Professional Documents
Culture Documents
MODERN
PROGRAMMING TOOLS &
TECHNIQUES-2
Sum=1+x/1! +x3/3!+x5/5!+x7/7!+xn/n!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int w,x,q,s=1;
Console.WriteLine("Enter value for variable w");
w = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter value for variable x");
x = Convert.ToInt32(Console.ReadLine());
for (q = 1; q <= n; q=q+2)
{
int k = 1;
int r = 1;
for (int m = 1; m <= q; m++)
{
f = k * q;
g = r*x;
}
Console.WriteLine(g);
Console.WriteLine(f);
s = s + r/k;
}
Console.WriteLine(s);
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
}
Console.WriteLine(y);
Console.ReadLine();
}
}
}