Wednesday 22 August 2012

Greatest value between Two Numbers


#include <stdio.h>
#include <conio.h>

void main()
{
                int a,b;
                clrscr();

                printf("Enter the first number : ");
                scanf("%d",&a);

                printf("Enter the second number : ");
                scanf("%d",&b);

                if(a>b)
                {
                                printf("A is greater than B\n");
                }
                else
                {
                                printf("B is greater than A\n");
                }
               
                getch();
}

0 comments:

Post a Comment