Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2. namespace Lab
  3. {
  4.     class MainClass
  5.     {
  6.         public static void Main(string[] args)
  7.         {
  8.             int x = 33, i = 1, f = 1, x1 = 0;
  9.             double sum = 0, e = 2.72;
  10.             x1 = x;
  11.             while (x/f > 0.0001)
  12.             {
  13.                 Console.Write(" sum             ");
  14.                 Console.WriteLine(" func ");
  15.                 sum += x / f;
  16.                 Console.Write(sum);
  17.                 Console.Write("                 ");
  18.                 Console.WriteLine(e);
  19.                 x *= x1;
  20.                 i++;
  21.                 f *= i;
  22.                 e *= e;
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement