Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace _4_лаба_сумма_ряда_1_семестр_
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void label1_Click(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- const double eps = 0.00001;
- double x;
- double summ = 0.0;
- x = Convert.ToDouble(textBox1.Text);
- double j = ((14 * x * x) / (27));
- for (Int32 n=2; eps <= j && n<=14; n++)
- {
- j = ((14 * x * x) / (27 * n));
- summ = summ += j;
- }
- label3.Text = Convert.ToString(summ);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement