Such a question: why when entering the program value (not exactly the whole) is duplicated? Here is the code:
void main(void) { int g = 0; int flagmin = 0; int i = 0; int flagpoint = 0; double r1 = 0, im1 = 0; int x = 0, h = 0; cout << "Vvedi a.re: "; while (true) { fflush(stdin); cin << x; if (x == 13) break; switch (x) { } } if (flagmin == 1) r1 = r1 * (-1); cout << '\n'; flagmin = 0; flagpoint = 0; g = 0; i = 0; cout << "Vvedi a.im: "; while (true) { cin << x; if (h == 13) break; switch (h) { } if (i == 6) break; } if (flagmin == 1) im1 = im1 * (-1); complex a(r1, im1); complex b(999, 100); complex c = a; // на сложение complex y = a; // на умножение cout << "\n"; cout << "A:\n"; a.Print(); cout << "B:\n"; b.Print(); cout << "Symma:\n"; a = c + b; c.Print(); cout << "Proizv:\n"; a = y * b; y.Print(); system("PAUSE"); }