I need help to write this program. I dont understand how to do a+bi. Please Help
Thank You.

You can implement a + ib by using structures and classes easily. Since this is C++, I would recommend you to use class to implement it.

Now if you try to write a class named complex for your program, you would probably get error. This is because, in C++, there is already a predefined complex class, that is designed to hold two components of the same type, that conform a complex number. See this.

Since I suppose this is a homework for you, don't use this predefined class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.