Hi everyone, i have 2 different complex number at my class. i want to be collection subtraction multiplication and division. you know. my code is right there! anyone help me =)
//KARMASIK SAYILAR DORT İSLEM
#include <iostream>
using namespace std;
class karmasik_sayi
{
private:
int imajiner;
int reel;
public:
karmasik_sayi()
{
reel=0;
imajiner=0;
};
karmasik_sayi (int x,int y)
{
imajiner=y;
reel=y;
};
karmasik_sayi eslenik();
void yazdir();
};
To add or subtract two complex numbers, just add or subtract the corresponding real and imaginary parts. For instance, the sum of 5 + 3i and 4 + 2i is 9 + 5i.
In other words, something like karmasik_sayi c( a.reel + b.reel, a.imajiner + b.imajiner );