Ask Experts Questions for FREE Help !
Ask
    Jitender rana's Avatar
    Jitender rana Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 29, 2013, 07:45 PM
    ask c questions online
    #include<stdio.h>
    #include<conio.h>
    struct complex {
    float real;
    float image;
    };
    void main()
    {
    struct complex a,b;
    input();
    }
    {
    input()}

    struct complex a,b;
    int c;
    printf("enter the first complex no (x+iy)\n");
    scanf("%f %f \n",&a.real,&b.image);
    printf("enter the 2nd complex no. (x+iy)\n");
    scanf("%f %f\n",&a.real,&b.image);
    while((c=getchar())!='q'){
    menu();
    switch(c){
    case 'a':
    add(a,b);
    break;
    case's':
    sub(a,b);
    break;
    case'm':
    mult(a,b);
    break;
    case'd':
    div(a,b);
    break;
    }
    }
    menu()
    {
    printf("a=addition\n");
    printf("enter an option\n");
    }
    add(a,b)
    struct complex a,b;
    {
    struct complex c;
    c.real=a.real+b.real;
    c.image=a.image+b.image;
    printf("addition of 2 complex no:\n");
    output(c);
    }

    output(c);
    struct complex c;
    {
    if(c.image<0)
    printf("%0.2f %0.2fi\n",c.real,c.image);
    else
    printf("%0.2f+i%0.2f\n",c.real,c.image);
    }
    getch();
    }



    not able to run the program.please help!

Check out some similar questions!

Ask pregnancy questions online? [ 2 Answers ]

If you had unprotected sex, yes, you could be pregnant. You also did not follow the instructions for Yasmin (and that's a very dangerous thing to do). Taking a "handful" of pills following unprotected sex is NOT going to prevent pregnancy. You need to call the Physician who prescribed the...

Ask islamic questions online [ 5 Answers ]

Sallam brother, I have a question to ask on behalf of someone else. There is this couple who has been married for over ten years and have 3 kids. The husband loves the kids and wife and is very committed, the wife takes good care of the family, on the surface, they seem like a very happy couple. ...

Ask physics questions online [ 0 Answers ]

chase plane moves with a speed of 290 km / h and carries a cliff at an angle of 30 degree below the horizontal. An instrument capsule released from the aircraft and fall to the ground. The horizontal distance between the release point and the point where the instrument pod hit is d = 700 a,...

Where to ask questions about islam online? [ 6 Answers ]

Why muslims are allowed to marry cousin sisters


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.