The World of Numbers

  • + 0 comments

    Read two integers from the user

    read -p "Enter the first integer: " a read -p "Enter the second integer: " b

    Perform calculations

    sum=((a - b)) prod=$((a * b))

    Handle division by zero

    if [ "((a / b)) else quot="Undefined (division by zero)" fi

    Display results

    echo "diff" echo "quot"