Program to multiply 2 complex no.s - c++ program, C/C++ Programming

 THIS PROGRAM IS TO MULTIPLY 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-a.imag*b.imag)+(a.real*b.imag+a.imag*b.real);
// c.imag = a.imag * b.imag;
 cout< cout<<"the multiplication is : "< getch();
 }

Posted Date: 10/22/2012 5:07:47 AM | Location : United States







Related Discussions:- Program to multiply 2 complex no.s - c++ program, Assignment Help, Ask Question on Program to multiply 2 complex no.s - c++ program, Get Answer, Expert's Help, Program to multiply 2 complex no.s - c++ program Discussions

Write discussion on Program to multiply 2 complex no.s - c++ program
Your posts are moderated
Related Questions
Ravi is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''''{'''' and end with ''''}

Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor



Write a program IdentyfyWordsMain.java reading a fi le (like HistoryOfProgramming) and divide the text into a sequence of words (word=sequence of letters). Save the result in a new

Dynamic Initialization of objects: It is initializing the objects by passing the valued to the constructor from the user input or other means.   Through cin operator a value

how can I find the GCD of 2 given numbers using Euclidean Algorithm ?

#queComputers are frequently used in check-writing systems, such as payroll and accounts payable applications. Many stories circulate regarding weekly pay- checks being printed (by

#question.Write a c++ program to accept and print a 1_d array

Project Description: I´ve a need linux programming job. if you are interested, Skills required are C Programming, PCB Layout, Embedded Software, Python, Software Architecture