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

Assignment Help:

 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();
 }


Related Discussions:- Program to multiply 2 complex no.s - c++ program

What is scope resolution operator, Scope Resolution operator: The scope...

Scope Resolution operator: The scope resolution operator: : is used to access global variable in the inner block. When global and local variable are identical name the scope re

C program for function of divider , C Program for FUNCTION OF DIVIDER ...

C Program for FUNCTION OF DIVIDER int gcd(int , int); void main() {           int m=0,n=0,k=0;           clrscr();           printf("ENTER THE FIRST DIGIT: ");

Pointer declaration for member function, P o i n t e r d...

P o i n t e r d e c l a r a t i o n f o r me m b e r f un c t i o n : M e t h o d 1 : W h e n C l a ss i s n o t

How to write a function template, How to write a function template A fu...

How to write a function template A function template should be written at the beginning of the program in the global area, or you may place it into a header file. All function

Assignment, Develop a C++ program that uses a while to determine the gross ...

Develop a C++ program that uses a while to determine the gross pay (in Dollars) for each of several employees. The company pays “straight-time” for the first 40 hours worked by ea

C program for find even & odd no.s in the array , C Program for FIND EVEN &...

C Program for FIND EVEN & ODD NO.S IN THE ARRAY #include stdio.h> #include string.h> #include conio.h> void main() {           int i=0,j=0, l_e[100],l_o[100];

Arrays, how to avoid duplicates strings in an array

how to avoid duplicates strings in an array

Add guts to vs 2008 c++ windows service, Add guts to VS 2008 C++ windows se...

Add guts to VS 2008 C++ windows service Project Description: I have a shell windows32 service written in 2008 VS C++. I want the functionality part started. Need someone too

AREAUNDERCURVE, Write a program to find the area under the curve y = f(x) b...

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. The area under a curve betw

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd