Friday, October 1, 2010

C code to find the greater of two integers using the relational operator and if statement

int main()
{
int a,b;
printf("enter two numbers\n");
scanf("%d %d",&a,&b);
if(a>b)
printf("a (%d) is greator",a);
else
printf("b (%d) is greator",b);
getch();
}

No comments:

Post a Comment

Google+ Followers