Problem 13: Equation

Take four integer variables a, b, x and y. Scan the values of the variables from user using scanf() function. Now print the output of the following equation:
(a*b) + (x*y)

3,346 total views, 4 views today

Comments

comments

7 thoughts on “Problem 13: Equation”

  1. #include
    int main()
    {
    int a,b,x,y;
    scanf(“%d %d %d %d”,&a,&b,&x,&y);
    eqn=(a*b)+(x*y);
    printf(“%d”,eqn);
    return (0);
    }

  2. #include
    int main()
    {
    int a,b,x,y,eqn;
    scanf(“%d %d %d %d”,&a,&b,&x,&y);
    eqn=(a*b)+(x*y);
    printf(“%d”,eqn);
    return (0);
    }

  3. #include
    int main()
    {
    int a,b,x,y,e;
    printf(“Enter Four numbers plz\n”);
    scanf(“%d %d %d %d”,&a,&b,&x,&y);
    e=(a*b)+(x*y);
    printf(“%d”,e);
    return 0;
    }

  4. #include<stdio.h.
    int main()
    {
    int a,b,x,y,eq;
    scanf("%d%d%d%d\n",&a,&b,&x,&y);
    eq=(a*b)+(x*y);
    printf("The equation is %d\n",eq);

  5. #include
    #include

    int main()
    {
    int a,b,x,y,ans;
    printf(“Enter the value of ‘a’ :\n”);
    scanf(“%d”,&a);
    printf(“Enter the value of ‘b’ :\n”);
    scanf(“%d”,&b);
    printf(“Enter the value of ‘x’ :\n”);
    scanf(“%d”,&x);
    printf(“Enter the value of ‘y’ :\n”);
    scanf(“%d”,&y);

    ans=(a*b)+(x*y);
    printf(“\nThe final value is:%d\n”,ans);

    return 0;
    }

  6. #include
    int main()
    {
    int a,b,x,y,sum;
    scanf(“%d%d%d%d”,&a,&b,&x,&y);
    sum=(a*b)+(x*y);
    printf(“sum is %d”,sum);
    return 0;
    }

  7. int main(){

    int a, b, x, y;
    scanf(“%d %d %d %d”, &a, &b, &x, &y);
    printf(“%d”, (a*b)+(x*y));

    return 0;
    }

Leave a Reply

Your email address will not be published.