Advertisement
cd62131

loan

Apr 8th, 2014
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #!/bin/bash -e
  2. echo -n '元金を入力してください: '
  3. read amount
  4. echo -n '借入期間を10日単位で入力してください: '
  5. read term
  6. awk "BEGIN { loan = 1
  7.             for(i = 0; i < ${term} / 10; i++) { loan *= 1.1 }
  8.             loan *= ${amount}
  9.             print \"返す金額は\" loan \"円です。\" }"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement