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 C++ by kisiel ( 14 years ago )
#include <iostream>
#include "lzespolona.hh"
#include <iomanip>
#include <cstring>
#include <cstdlib>
using namespace std;
/*
* Przeciazenie operator "+" definiuje ...
*/
LZespolona LZespolona::operator + (const LZespolona& Arg2) const
{
LZespolona Wynik;
Wynik.re = re + Arg2.re;
Wynik.im = im + Arg2.im;
// Tu trzeba wpisac odpowiedni kod
return Wynik;
}
LZespolona LZespolona::operator - (const LZespolona& Arg2) const
{
LZespolona Wynik;
Wynik.re = re - Arg2.re;
Wynik.im = im - Arg2.im;
return Wynik;
}
ostream & operator << (ostream & StrmWy, LZespolona& Arg1)
{
return StrmWy << Arg1.re << showpos << Arg1.im << noshowpos << ”i”;
}
istream & operator >> (istream & StrmWe, LZespolona& Arg1 )
{
StrmWe >> Arg1.re;
StrmWe >> Arg1.im;
StrmWe.ignore( );
return StrmWe;
}
Revise this Paste