-
What is the output of this program?
#include <iostream>
#include <complex>
using namespace std;
int main()
{
complex<double> Comp1(3.0, 9.0), Comp2;
Comp2 = pow(Comp1, 2.0);
cout << Comp2;
return 0;
}
-
- (3.0, 9.0)
- (3.0, 2.0)
- (9.0, 3.0)
- (-72,54)
- (-54,72)
Correct Option: D
In this program, we are finding the square of the complex number.