Largest / Smallest (5 integers)
Code:
#include <stdio.h>
int main()
{
int a,b,c,d,e;
printf( "Enter number for 'a':\n" );
scanf( "%d", &a );
printf( "Enter number for 'b':\n" );
scanf( "%d", &b );
printf( "Enter number for 'c':\n" );
scanf( "%d", &c );
printf( "Enter number for 'd':\n" );
scanf( "%d", &d );
printf( "Enter number for 'e':\n" );
scanf( "%d", &e );
if(a > b && a > c && a > d && a > e);
printf( "Letter 'a' is the largest number\n", a);
if(a < b && a < c && a < d && a < e);
printf( "Letter 'a' is the smallest number\n", a);
if(b > a && b > c && b > d && b > e);
printf( "Letter 'b' is the largest number\n", b);
if(b < a && b < c && b < d && b < e);
printf( "Letter 'b' is the smallest number\n", b);
if(c > a && c > b && c > d && c > e);
printf( "Letter 'c' is the largest number\n", c);
if(c < a && c < b && c < d && c < e);
printf( "Letter 'c' is the smallest number\n", c);
if(d > a && d > b && d > c && d > e);
printf( "Letter 'd' is the largest number\n", d);
if(d < a && d < b && d < c && d < e);
printf( "Letter 'd' is the smallest number\n", d);
if(e > a && e > b && e > c && e > d);
printf( "Letter 'e' is the largest number\n", e);
if(e < a && e < b && e < c && e < d);
printf( "Letter 'e' is the smallest number\n", e);
return 0;
}
This just prints all the printf's. How do I get this to determine which number is largest and which is smallest?