Monday 28 December 2020

Shell programming to swap two values

 Programming :

clear

echo " Enter value for x  "

read x

echo " Enter value for y "

read y

echo " Before swap; x=$x and y=$y "

z=$x

x=$y

y=$z

echo " After swap, x=$x and y=$y "

No comments:

Post a Comment