Last active
April 11, 2016 04:55
-
-
Save jonathansolorzn/62b01afd48e108ff8e9f8a4a007a9ee0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Numerics; | |
namespace Guia3Ej15 | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
double a, b;//Variables para numero complejo1 | |
double c, d;//Variables para numero complejo2 | |
Console.WriteLine("******************************\n" | |
+ "**** Ejercicio 15 ****\n"); | |
Console.Write("PIMER NUMERO COMPLEJO\n\n" | |
+ "Ingrese el primer valor del numero complejo (ej. 15): "); | |
a = double.Parse(Console.ReadLine()); | |
Console.Write("Ingrese el segundo valor del numero complejo (ej. 21): "); | |
b = double.Parse(Console.ReadLine()); | |
Console.Write("SEGUNDO NUMERO COMPLEJO\n\n" | |
+ "Ingrese el primer valor del numero complejo: (ej. 15)"); | |
c = double.Parse(Console.ReadLine()); | |
Console.Write("Ingrese el segundo valor del numero complejo: (ej. 21)"); | |
d = double.Parse(Console.ReadLine()); | |
Complex complejo1 = new Complex(a, b); | |
Complex complejo2 = new Complex(c, d); | |
Console.WriteLine("{0} + {1} = {2}", complejo1, complejo2, complejo1 + complejo2); | |
Console.WriteLine("{0} * {1} = {2}", complejo1, complejo2, complejo1 * complejo2); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment