Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions 02-add_nums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ echo "The sum is $sum"

# exercise: ask the user for the width and height and present total
# number of pixels

echo "Now let's calculate area differently!"
echo "Width please:"
read width
echo "Height please:"
read height

cm_area=$(( width*height/100 ))

echo "Area in cm^2: $cm_area"
Binary file added after-merging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added two-branches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.