Pages

Monday, January 2, 2012

C Programming to display the greater number


/*to display the greater number*/
#include<stdio.h>
#include<stdlib.h>
int main( )
{
    float a,b;
    printf ("enter two numbers: ");
    scanf ("%f%f",&a,&b);
    if (a>b)
       printf ("%f is greater than %f",a,b);
    else
        printf ("%f is greater than %f",b,a);
    system ("pause");
    return 0;
}

No comments:

Post a Comment