C source code for finding the minimum of 3 numbers

 
#include <stdio.h>
 
int main(void)
{
   int   x, y, z, min;
 
   printf("Input three integers:  ");
   scanf("%d%d%d", &x, &y, &z);
   if (x < y)
      min = x;
   else
      min = y;
   if (z < min)
      min = z;
   printf("The minimum value is %d\n", min);
   return 0;
}
Creative Commons License Valid CSS Valid XHTML 1.0 Driven by DokuWiki Powered by PHP Powered by Apache get firefox!! kgareth.com Recent changes RSS feed