Simple Your details program in DOS. This is a menu driven program. Try it.
@ECHO off
color 2
cls
:start
ECHO.
ECHO 1. Print Name
ECHO 2. Print Mobile
ECHO 3. Print Address
set choice=
set /p choice=Type the number to print text.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto op1
if '%choice%'=='2' goto op2
if '%choice%'=='3' goto op3
ECHO "%choice%" is not valid, try again
ECHO.
goto start
:op1
ECHO "Write Your name"
goto end
:op2
ECHO "Write Your mobile number"
goto end
:op3
ECHO "Write your address"
goto end
:end
@ECHO off
color 2
cls
:start
ECHO.
ECHO 1. Print Name
ECHO 2. Print Mobile
ECHO 3. Print Address
set choice=
set /p choice=Type the number to print text.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto op1
if '%choice%'=='2' goto op2
if '%choice%'=='3' goto op3
ECHO "%choice%" is not valid, try again
ECHO.
goto start
:op1
ECHO "Write Your name"
goto end
:op2
ECHO "Write Your mobile number"
goto end
:op3
ECHO "Write your address"
goto end
:end
0 comments:
Post a Comment
You are most welcome for making comments here. I will consider your view and will reply you soon.