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
15 changes: 13 additions & 2 deletions 02-add_nums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,16 @@ sum=$(( first+second+third ))

echo "The sum is $sum"

# exercise: ask the user for the width and height and present total
# number of pixels
# --- Eyob Kabeto final merged version ---
echo "Enter the width of the screen:"
read width

echo "Enter the height of the screen:"
read height

total_pixels=$(( width * height ))
echo "Your screen has $total_pixels pixels total."

echo "Now let's estimate half that area for a preview window."
half_pixels=$(( total_pixels / 2 ))
echo "Half-size preview uses $half_pixels pixels."
Binary file added branches_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.