Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by Robert ( 13 years ago )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            /*Zadanie 1
Napisz program który pomnoży dwie liczby zespolone z1=1+2i oraz z2=1-3i.Wynik wyświetl na ekranie.

             */
            int rez1 = 1;
            int rez2 = 2;
            int imz1 = 2;
            int imz2 = -3;
            int rez3 = 0;
            int imz3 = 0;

            rez3 = rez2 * rez1;
            imz3 = (imz2 * imz1) * (-1);
            string z3re=Convert.ToString(rez3);
            string z3im=Convert.ToString(imz3);
            string z3=z3re + z3im;

            Console.WriteLine("Liczba z3=z2*z1= "+z3re+"+" +z3im);
            Console.ReadKey();
            
        }
    }
}

 

Revise this Paste

Your Name: Code Language: