Advertisement
Guest User

3 digit

a guest
Aug 14th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. read i1
  4. read i2
  5. read i3
  6.  
  7. if (( i1 == i2 )) ; then
  8.     echo -n "$i1, $i2"
  9.     if (( i2 == i3 )) ; then
  10.         echo "$i3"
  11.         break
  12.     fi
  13. elif (( i1 == i3 )) ; then
  14.     echo -n "$i1 $i3"
  15.     if (( i3 == i2 )) ; then
  16.         echo "$i3"
  17.         break
  18.     fi
  19. elif (( i2 == i3 )) ; then
  20.     echo -n "$i2 $i3"
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement