Wednesday, 5 December 2012

CPL PROGRAM 10 CODING

                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();
}

No comments:

Post a Comment