本帖最后由 panda951 于 2015-3-16 15:48 编辑
这个是我想出来的...
缺--选他里面其中一个要用什么符号/代码/数字弄到去加...
:food
:sup
:drink
只选一个就可以了- @echo off
-
- echo happy happy menu
- echo list
-
-
- :drink
- echo --------------------------------------
- set kopi=1
- set lemon tea=1
- set ice tea=2
- set tea=5
- set durian tea=7
- set grape tea=10
-
- echo drink
- echo kopi RM1
- echo lemon tea RM1
- echo ice tea RM2
- echo tea RM5
- echo durian tea RM7
- echo grape tea RM10
-
- echo pls choice your drink(1-6):
- set /p drink=
- echo --------------------------------------
- :food
- echo --------------------------------------
- set nasi=5
- set mee=9
- set nasi lemak=11
- set mee lemak=22
- set nasi lemak goreng=33
- set meel lemak goreng=100
-
- echo food
- echo nasi RM5
- echo mee RM9
- echo nasi lemak RM11
- echo mee lemak RM22
- echo nasi lemak goreng RM33
- echo meel lemak goreng RM100
-
- echo pls choice your food(1-6):
- set /p food=
- echo --------------------------------------
- :sup
- echo --------------------------------------
- set kamping=7
- set ikan=8
- set ayam=10
- set sotong=12
- set sea food=16
- set kamping vs ayam=18
-
- echo sup
- echo kamping RM7
- echo ikan RM8
- echo ayam Rm10
- echo sotong RM12
- echo sea food RM16
- echo kamping vs ayam RM18
-
- echo pls choice your sup(1-6):
- set /p sup=
- echo --------------------------------------
- echo --------------------------------------
- set service charge=5
- echo service charge RM 5
- echo --------------------------------------
-
- pls comfirm your order:
- echo food
- echo
-
- echo drink
- echo
-
- echo sup
- echo
- set /a total=%drink%+%food%+%sup%
- echo total RM%total%
-
- echo total you have to pay:
- set /a total1=%drink%+%food%+%sup%+%service charge%
-
- echo total have you to pay:
- echo RM%total1%
- pause
复制代码
|