Skip to content

Commit

Permalink
Update unit_converter.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-nath authored Aug 8, 2023
1 parent 8028bfa commit e2deaa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripting/unit_converter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ f2i() {
inches=${2:-0} # If in not provided, default to 0

total_inches=$((feet * 12 + inches))
echo "$feet ft $inches in = $total_inches inches"
echo "$feet ft $inches in = $total_inches in"
}

# Function to convert from in to centimeters
Expand All @@ -35,7 +35,7 @@ c2i() {

centimeters=$1
inches=$(bc <<< "scale=2; $centimeters / 2.54")
echo "$centimeters cm = $inches inches"
echo "$centimeters cm = $inches in"
}

# Function to convert from inches to feet
Expand All @@ -48,7 +48,7 @@ i2f() {
inches=$1
feet=$((inches / 12))
remaining_inches=$((inches % 12))
echo "$inches in = $feet ft $remaining_inches inches"
echo "$inches in = $feet ft $remaining_inches in"
}

# Function to convert from feet to centimeters
Expand Down

0 comments on commit e2deaa5

Please sign in to comment.