Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Add bash script to calculate the sum of two numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcc1212 committed Mar 1, 2024
1 parent c4c32ba commit 82233f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bashExercise/2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

echo "Enter the first number: "
read num1
echo "Enter the second number: "
read num2
result=$(echo "$num1 + $num2" | bc)
echo "The sum of the two numbers is: $result"

0 comments on commit 82233f2

Please sign in to comment.