Add the two complex no.s given by user - c++ program, C/C++ Programming


 THIS PROGRAM IS TO ADD THE TWO COMPLEX NO.S GIVEN BY THE USER

 */

#include
#include
#include
struct complex
    {
    int real;
    int imag;
    };

void main()
 {
 clrscr();
 complex a,b,c;
 cout<<"input the real part for first complex number : ";
 cin>>a.real;
 cout<<"input the imaginary part for first complex number : ";
 cin>>a.imag;
 cout< cout<<"input the real part for second complex number : ";
 cin>>b.real;
 cout<<"input the imaginary part for second complex number : ";
 cin>>b.imag;
 c.real = a.real + b.real;
 c.imag = a.imag + b.imag;
 cout< cout<<"the sum is : "< getch();
 }

Posted Date: 10/22/2012 4:37:05 AM | Location : United States







Related Discussions:- Add the two complex no.s given by user - c++ program, Assignment Help, Ask Question on Add the two complex no.s given by user - c++ program, Get Answer, Expert's Help, Add the two complex no.s given by user - c++ program Discussions

Write discussion on Add the two complex no.s given by user - c++ program
Your posts are moderated
Related Questions
what is the syntax to get a coloured output.

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate

#At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with the

I would like to get you to collaborate in my project. We want a C programmer to Develop applications for Windows, the first application may be an Instant messenger encrypted in a w

Develop a .NET wrapper for a C++ Dll Project Description: We have a classic VC++ Dll that requires a .NET wrapper built by you. Use latest Visual Studio and .Net framework sh

Define a user-defined data type (struct) called Car to represent a car in the context of a car dealership database. Car must have at least the following characteristics: Make Model

i want software to calculate heating or use thermodynamic equation , pleas help me

Explain the Bit Wise Operators? C language has distinction of supporting special operators recognized as bit wise operators for manipulation of data at bit level. These operato

The size of () operator This is a pseudo-operator given by the language, which returns the number of bytes taken up by a variable or data type. The value returned by this opera