C code:

1.

#include<stdio.h>

1.

**Adding two complex numbers in c**
2.

3. **C program for addition of two complex numbers****C program to add two complex numbers**

#include<stdio.h>

int main(){

int a,b,c,d,x,y;

printf("\nEnter the first complex number:");

scanf("%d%d",&a,&b);

printf("\nEnter the second complex number:");

scanf("%d%d",&c,&d);

if(b<0)

printf("%d-i\n",a-b);

else

printf("d+i\n",a+b);

if(d<0)

printf("d-i\n",c-d);

else

printf("%d+i\n",c+d);

printf("\nADDITION ");

x=a+c;

y=b+d;

if(y>0)

printf("%d-i%d",x,-y);

else

printf("%d+i%d",x,+y);

printf("\n\nSUBTRACTION ");

x=a-c;

y=b-d;

if(y<0)

printf("%d-i%d",x,-y);

else

printf("%d+i%d",x,+y);

return 0;

}

## 11 comments:

Does multiplication of complex number programing diifers from addition ? since it leads to squaring of variable whats the logic of program.

if(b<0) x="a+c;" y="b+d;">0)

doesnt work?

"nonportable pointer conversion"

&

"statment missing ;"

sorry im just a begginer at C n would like to understand.

hi Pard

Your code has some syntactical error. So first you should read c tutorial of this blog

hi Priya

Addition of two matrix is very simple compare to multiplication.

For addition of two matrix of take two for loop add each element of one matrix with corresponding element of other matrix one by one and store in another two dimensional array.

a[i][j]=b[i][j]+c[i][j]

At our department store you can reveal sundry medication and of progression such lay Discount Viagra Pharmacy On-line the same – Cheap Generic Viagra pharmacy.

...please where can I buy a unicorn?

Il n'y a d'aucun sens. cialis cialis

I didn't understand any thing can any one explain.

program for addition and multiplication of two complex numbers using switch case

program for addition and multiplication of two complex numbers using switch case

Please tell me the coding of this question with output....

Write a program that reads an expression from the terminal and checks if the brackets are properly matched.

Post a Comment