What will be the output of the following C++ code?
#include <iostream>
#include <complex>
using namespace std;
int main()
{
complex <double> cn(3.0, 4.0);
cout<<log(cn)<<endl;
return 0;
}
#include <iostream>
#include <complex>
using namespace std;
int main()
{
complex <double> cn(3.0, 4.0);
cout<<log(cn)<<endl;
return 0;
}A. 1.60944
B. (1.60944,0.927295)
C. 0.927295
D. 1.60944 + 0.927295
Answer: Option B

Join The Discussion