Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double n = Convert.ToDouble(Console.ReadLine()); // wpisywanie n
- double x = Convert.ToDouble(Console.ReadLine()); // wpisywanie x
- double e = 1;
- int b=1;
- for (int i = 1; i <= n; i++)
- {
- b *= i;
- e += Math.Pow(x, i) / b; //potega przez silnie
- }
- Console.WriteLine(e); //wypisanie e
- Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement