A small Bash script that calculates simple interest from user input.
Simple Interest = (Principal x Rate x Time) / 100
- Principal: the initial amount of money
- Rate: the annual rate of interest, in percent
- Time: the time period, in years
chmod +x simple-interest.sh
./simple-interest.shThe script prompts for the principal, the rate of interest and the time period, then prints the simple interest.
Enter the principal amount: 1000
Enter the rate of interest (%): 5
Enter the time period (years): 2
Simple interest = 100
See CONTRIBUTING.md. Please follow the Code of Conduct.
Licensed under the Apache License 2.0. See LICENSE.