clear
echo "nam bang"
read nam
case `expr $nam % 10` in
0)can="canh" ;;
1)can="tan" ;;
2)can="nham" ;;
3)can="quy" ;;
4)can="giap" ;;
5)can="at" ;;
6)can="binh" ;;
7)can="dinh" ;;
8)can="mau" ;;
9)can="ky" ;;
esac
case `expr $nam % 12` in
0)chi="than." ;;
1)chi="dau." ;;
2)chi="tuat." ;;
3)chi="hoi." ;;
4)chi="ty." ;;
5)chi="suu." ;; 6)chi="dan." ;;
7)chi="mao." ;;
8)chi="thin." ;;
9)chi="ti." ;;
10)chi="ngo." ;;
11)chi="mui." ;;
esac
echo "$can - $chi"Tags: Lập trình Shell, lập trình Linux, Ubuntu, Script tính tổng
Klik untuk melihat kode: :) =( :s :D :-D ^:D ^o^ 7:( :Q :p T_T @@, :-a :W *fck* x@