Thursday 12 July 2012

Print Greater Or Smaller Number in C


#include<stdio.h>
#include<conio.h>
void main()
{
  int a,b;

  printf("enter the value of a");
  scanf("%d",&a);

  printf("enter the value of b");
  scanf("%d",&b);


if (a>b);
  {
printf("a is greater than b");
    printf("b is less than a");
}

if (a<b);

  {
printf("b is greater than a");
  printf("a is less than b");
}

  getch;      
}

No comments:

Post a Comment