Hello everyone, I’m new to code chef and I’m loving it. I’m on my 2nd problem called “ATM”.
I seem to be getting wrong answer even though my program gives proper output.
I’m assuming the online judge is inputting 120.00, which does give an error. I just wanted to ask if this is true, or something else in my code is faulted.
MY CODE:
#!/bin/bash
read input input2
if (( $input % 5 == 0 )) && [ $input -lt $input2 ]; then
echo “$input2 - $input - 0.5” | bc
else
echo “$input2”
fi