Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read a
- read b
- read c
- d=$((b*b-4*a*c))
- if ((d>=0)); then
- calc=$(echo "sqrt ($d)" | bc )
- x1=$((-b/2*a+calc/2*a))
- x2=$((-b/2*a-calc/2*a))
- echo "$x1""$x2"
- else
- echo "To trionimo den exei pragmatikes rizes"
- fi
- calc=$(echo "sqrt ($d)" | bc -l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement