GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cpp-code-snippets/complex.cpp at master · keineahnung2345/cpp-code-snippets Expand file tree/ Copy pathcomplex.cppMore file actions 15 lines (13 loc) · 431 Bytes / Copy pathcomplex.cppFile metadata and controls15 lines (13 loc) · 431 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // complex::real example #include <iostream> // std::cout #include <complex> // std::complex int main (){ std::complex<double> org(0.0,0.0), p1(3.0, 4.0); std::cout << "Real part: " << p1.real() << ", imaginary part: " << p1.imag() << std::endl; std::cout << "Distance to original point: " << std::abs(p1-org) << std::endl; return 0; } /* Real part: 3, imaginary part: 4 Distance to original point: 5 */ |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |