update stage
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Find the MIN MAX value of three values */
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
int a, b, c;
|
||||
|
||||
int max, min;
|
||||
|
||||
printf("Enter first nubmer: ");
|
||||
scanf("%d", &a);
|
||||
printf("Enter second nubmer: ");
|
||||
scanf("%d", &b);
|
||||
printf("Enter third nubmer: ");
|
||||
scanf("%d", &c);
|
||||
|
||||
if (a < b)
|
||||
{
|
||||
max = b;
|
||||
min = a;
|
||||
}
|
||||
|
||||
if (max < c)
|
||||
max = c;
|
||||
|
||||
if (c < min)
|
||||
min = c;
|
||||
|
||||
printf("MAXIMUM between 3 numbers = %d\n", max);
|
||||
printf("MINIMUM between 3 numbers = %d\n", min);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user