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.
Answers
Answered by
0
Answer:
Don`t know
Explanation:
Answered by
0
Answer: C program
Explanation:
#include<stdio.h>
#include<conio.h>
int main(){
int t;
int x, y;
int prod;
while(t !=0){
scanf("%d", &x);
scanf("%d", &y);
prod = x * y;
printf("/n %d", prod);
}
getch();
}
#SPJ3
Similar questions