Our friend scanf claims another victim.
#include <stdio.h>
int main(void)
{
int x, min, max;
printf("Enter val for max and x\n");
scanf("%d%d",&max,&x);
min = x > max ? max : x;
printf("%d\n",min);
return 0;
}
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314