Question
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
complex c1(4.0, 3.0);
7.
complex c2(polar(5.0, 0.75));
8.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
complex c1(4.0, 3.0);
7.
complex c2(polar(5.0, 0.75));
8.
cout
Answer: Option B
Was this answer helpful ?
In this program, we are adding both complex number and finding the square root of it.
Output:
$ g++ comp4.cpp
$ a.out
(6.12132,3.70711)
Was this answer helpful ?
More Questions on This Topic :
Question 7.
How to declare the complex number?
....
Submit Solution