Computer Science, asked by rehanabanu760, 2 months ago

Little Complex
Given n complex numbers each in the form x + yi, where x is the real part and y is the imaginary part, find their product.

Input Format
The first line of input consists of an integer t denoting the number of test cases. t test cases follow. The first line of each test case consists of an integer n, which denotes the number of complex numbers. Following n lines of the test case consists of two integers x and y separated by a space denoting x + yi.

Output Format
For each test case, output the product of the complex numbers. Each product is in the form p and q space separated denoting p + qi.

Sample Input
4
3
0 1
2 3
4 5
2
1 0
0 1
4
9 -3
0 10
-10 5
4 -4
3
-2 -6
0 0
-4 -2
Sample Output
-22 -7
0 1
-6000 0
0 0​

Answers

Answered by ffopgame
1

Explanation:

you are not in a chance to be able

Answered by vinod04jangid
0

Answer:

written below-

Explanation:

complex number is an element of a number system that contains the real numbers and a specific element denoted i, called the imaginary unit, and satisfying the equation i2 = −1. Moreover, every complex number can be expressed in the form a + bi, where a and b are real numbers. Because no real number satisfies the above equation, i was called an imaginary number by René Descartes. For the complex number a + bi, a is called the real part and b is called the imaginary part. The set of complex numbers is denoted by either of the symbols {\displaystyle \mathbb {C} }\mathbb {C} or C. Despite the historical nomenclature "imaginary", complex numbers are regarded in the mathematical sciences as just as "real" as the real numbers and are fundamental in many aspects of the scientific description of the natural world.

#SPJ3

Similar questions