#include <iostream> #include <complex> using namespace std; int main () { complex<double> Comp (10.0, 4.0); cout << imag(Comp) << endl; return 0; }
imag part will return the imaginary part of the complex number.
Previous Question Next Question
Your comments will be displayed only after manual approval.