CHRIST MCA 2009-2012
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )

Go down

Prog 17.	WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday ) Empty Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )

Post  1987ronnie Wed Jul 21, 2010 12:11 am

clear
if $# -eq 1
then
case $1 in
1) echo "Monday";;
2) echo "Tuesday";;
3) echo "Wednesday";;
4) echo "Thursday";;
5) echo "Friday";;
6) echo "Saturday";;
7) echo "Sunday";;
esac

else
echo "Wrong Arguements: Are you from earth?"
exit;

bounce Very Happy Shocked

1987ronnie

Posts : 3
Join date : 2010-07-20

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum