25
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
double tong, x, y, v;
8
long gt;
9
Console.WriteLine("Nhập vào giá trị x:");
10
x = double.Parse(Console.ReadLine());
11
tong = 1;
12
for(int i=1; i<=5; i++)
13
{
14
y = Math.Pow(-1,i)*Math.Pow(x,2*i);
15
gt = 1;
16
for(int j=1; j<=2*i; j++)
17
{
18
gt = gt * j;
19
}
20
v = y/gt;
21
tong = tong + v;
22
}
23
Console.WriteLine("Tong day so: {0}",tong);
24
}
25
}
Cached Result