Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

PROGRAM TO FIND (X + Y) / (X - Y) , (X + Y) / 2 and (X + Y) * (X - Y)

Posted By: Freda Lane     Category: C Programming     Views: 3065

PROGRAM TO FIND

<1> . (X + Y) / (X - Y)
<2> . (X + Y) / 2
<3> . (X + Y) * (X - Y)

Code for PROGRAM TO FIND (X + Y) / (X - Y) , (X + Y) / 2 and (X + Y) * (X - Y) in C Programming

#include<stdio.h>
#include<conio.h>

void main()
{
    int x,y;
    clrscr();

    printf("Enter the value of X:-");
    scanf("%d",&x);

    printf("Enter the value of Y:-");
    scanf("%d",&y);

    printf("%f\t",(float)(x+y)/(x-y));

    printf("%f\t",(float)(x+y)/2);

    printf("%f\t",(float)(x+y)*(x-y));
    getch();
}


/*
********
OUTPUT
********

Enter the value of X:-13

Enter the value of Y:-12

25.000000

12.500000

25.000000
*/
  
Share: 



Freda Lane
Freda Lane author of PROGRAM TO FIND (X + Y) / (X - Y) , (X + Y) / 2 and (X + Y) * (X - Y) is from Chicago, United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!