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
Write a C program to input your full forename and full surname. e.g James McCarren and display in one string your complete initial and surname i.e J McCarren . Your initial should

Question: a) Give two uses of NFS. b) Give one advantage of using NFS. c) Explain the following lines as they would be interpreted in the /etc/exports file i. /usr/local


c program to implement least cost method

A: C++, unlike only about every other language with exceptions, is extremely accomodating while it comes to what you can throw. Actually, you can throw anything you akin to. That b

how many bytes required to char

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

program that counts the number of occurrences of the string in the n-th padovan string p(n)

Find out the largest torque: A flat belt is taken in use to transmit torque from pulley A to pulley B as shown in figure given below. The radius of each pulley is 50mm and co

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.   #include float start_poin