1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("ENTER A NUMBER\n"); scanf("%d",&a); printf("ENTER SECOND NUMBER\n"); scanf("%d",&b); if(a==b) { printf("\n \n YES %d IS EQUAL TO %d\n",a,b); printf("BOTH NUMBERS ARE EQUAL\n"); } else { if(a>b) { c=a-b; printf("\n %d is GREATER THAN %d",a,b); printf("\n DIFFERENCE IS %d",c); } if(a<b) { c=b-a; printf("\n %d IS GREATER THAN %d",b,a); printf("\n DIFFERENCE IS %d",c); } printf("\n ANYWAY %d IS NOT EQUAL TO %d\n",a,b); } getch(); } |
Search This Blog
Monday, 9 September 2013
FIND LENGTH OF ENTRED NUMBER.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment