Boyce earns P35.00 per hour at his job. What would be his annual income be if he works 8 hours per day, 5 days per week, and 50 weeks per year? Write a script to support you answer, the script should prompt a user to enter his\her hourly rate, number of hours per day, number of days per week and number of weeks per year. Then the system computes the annual income [10 marks]
#!/bin/bash
read -p "Rate: " rate
read -p "Hours per day: " hours
read -p "Days per week: " days
read -p "Weeks per year: " weeks
let res=$rate*$hours*$days*$weeks
echo $res
Comments
Leave a comment