Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sesión 9: 18/02/2020
- 1.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0;
- //Inico el Ciclo For.
- for (double n = 1; n <= 100; n++)
- {
- sumatoria = (1 / n) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
- 2.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0;
- //Inico el Ciclo For.
- for (double n = 0; n <= 100; n++)
- {
- sumatoria = (Math.Pow(-1,n) / (n + 1)) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
- 3.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0;
- //Inico el Ciclo For.
- for (double n = 0; n <= 100; n++)
- {
- sumatoria = (1 / Math.Pow(2,n)) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
- 4.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0, x;
- //Pedimos el Valor para x.
- Console.WriteLine("Dame el Valor de x: ");
- x = double.Parse(Console.ReadLine());
- //Inico el Ciclo For.
- for (double n = 0; n <= 100; n++)
- {
- sumatoria = (1 / Math.Pow(x,n)) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
- 5.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0;
- //Inico el Ciclo For.
- for (double n = 0; n <= 100; n++)
- {
- sumatoria = (Math.Pow(-1, n) / Math.Pow(2,n)) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
- 6.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sesion08
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaracion de Variables.
- double sumatoria = 0, x;
- //Pedimos el Valor para x.
- Console.WriteLine("Cuanto vale x: ");
- x = double.Parse(Console.ReadLine());
- //Inico el Ciclo For.
- for (double n = 0; n <= 100; n++)
- {
- sumatoria = (Math.Pow(-1, n) / Math.Pow(x,n)) + sumatoria;
- Console.WriteLine(n + "" + sumatoria);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement