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
Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

It is a feature in C++ to reduce name collisions in the global name space. This namespace keyword assigns a separate name to a library that allows other libraries to use the simila

construct a console programme for a bank ATM machine.

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

Program is to check whether the string entered is a palindrome or not: Program is to check whether the string entered is a palindrome or not invoke function from main int p

Program is to perform all the functions that are performed in a super bazaar: class stock   {   private:     int itno;     char itname[20];     char brname[20];

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

A: N delete p is a two-step procedure: it calls the destructor, and then releases the memory. The code developed for delete p is functionally similar to this (supposing p is of typ

Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year

Define Bitwise-AND Operator: &:? The bitwise-AND operator (&) compares every bit of its first operand to the corresponding bit of its second operand. If both bits are 1 the mat