IMPLEMENTATING ARITHMETIC, LOGICAL AND BOOLEAN EXPRESSIONS.
CODING:
#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("\nx+y=%d",x+y);
printf("\nx-y=%d",x-y);
printf("\nx*y=%d",x*y);
printf("\nx/y=%d",x/y);
printf("\nx%y=%d",x%y);
printf("\nx&&y=%d",x&&y);
printf("\nx||y=%d",x||y);
printf("\nx!=y=%d",x!=y);
printf("\nx&y=%d",x&y);
printf("\n!y=%d",!y);
printf("\n~y=%d",~y);
getch();
}
CODING:
#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("\nx+y=%d",x+y);
printf("\nx-y=%d",x-y);
printf("\nx*y=%d",x*y);
printf("\nx/y=%d",x/y);
printf("\nx%y=%d",x%y);
printf("\nx&&y=%d",x&&y);
printf("\nx||y=%d",x||y);
printf("\nx!=y=%d",x!=y);
printf("\nx&y=%d",x&y);
printf("\n!y=%d",!y);
printf("\n~y=%d",~y);
getch();
}
No comments:
Post a Comment