@ECHO OFF
SET /P f="Enter a mode(1->,2-<): "
IF %f% EQU 1 (
SET /P a="Enter a first number: "
SET /P b="Enter a second number: "
SET /P a="Enter a third number: "
IF %a% GTR %b%(
IF %a% GTR %c%(
ECHO "Number "%a%" is the largest"
)
ELSE(
ECHO "Number "%c%" is the largest"
)
)
ELSE(
IF %b% GTR %c%(
ECHO "Number "%b%" is the largest"
)
ELSE(
ECHO "Number "%c%" is the largest"
)
IF %f% EQU 2 (
SET /P a="Enter a first number: "
SET /P b="Enter a second number: "
SET /P a="Enter a third number: "
IF %a% LSS %b%(
IF %a% LSS %c%(
ECHO "Number "%a%" is the smallest"
)
ELSE(
ECHO "Number "%c%" is the smallest"
)
)
ELSE(
IF %b% LSS %c%(
ECHO "Number "%b%" is the smallest"
)
ELSE(
ECHO "Number "%c%" is the smallest"
)
ELSE(
ECHO "Error"
)
PAUSE