C Program Addition Substraction Multiplication Division

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int x, y, result;
    printf("\n Enter two number :");
    scanf("%d%d",&x,&y);
    result=x+y;
    printf("\n Addition = %d",result);
    result=x-y;
    printf("\n Subtraction = %d",result);
    result=x*y;
    printf("\n Multiplication = %d",result);
    result=x/y;
    printf("\n Division = %d",result);
    getch();
}

Run1:

No comments:

Post a Comment

100 C Programs with Code and Output

Program 1: C Program To Read Two Numbers And Print The Sum Of Given Two Numbers. Program 2: C Program To Read Three Numbers And Prin...