Last active
August 27, 2018 16:58
-
-
Save ace-subido/2a0c850aac6e118d444bf60da281b27b to your computer and use it in GitHub Desktop.
Answer generator for the following Tito statement: "Entitled mga bata ngayon, ang laki nga ng mga sahod nila ngayon eh. Nung 1980 $salary_amount lang starting salary ko noon."
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salary = 3000 | |
puts "Tito: Noong 1980, #{salary} lang salary ko" | |
# > Tito: Noong 1980, 3000 lang salary ko | |
# Computed from CPI, source here https://docs.google.com/spreadsheets/d/1gPqRL2zKymVaOiWUqj3vMqc5FomahgbZdIsChcfq3Do/edit#gid=0 | |
# Starting in 1980 | |
inflation = [ | |
{ year: 1980, value: 18.20 }, | |
{ year: 1981, value: 13.08 }, | |
{ year: 1982, value: 10.22 }, | |
{ year: 1983, value: 10.03 }, | |
{ year: 1984, value: 50.34 }, | |
{ year: 1985, value: 23.10 }, | |
{ year: 1986, value: 1.15 }, | |
{ year: 1987, value: 4.07 }, | |
{ year: 1988, value: 13.86 }, | |
{ year: 1989, value: 12.24 }, | |
{ year: 1990, value: 12.18 }, | |
{ year: 1991, value: 19.26 }, | |
{ year: 1992, value: 8.65 }, | |
{ year: 1993, value: 6.72 }, | |
{ year: 1994, value: 10.39 }, | |
{ year: 1995, value: 6.83 }, | |
{ year: 1996, value: 7.48 }, | |
{ year: 1997, value: 5.59 }, | |
{ year: 1998, value: 9.23 }, | |
{ year: 1999, value: 5.94 }, | |
{ year: 2000, value: 3.98 }, | |
{ year: 2001, value: 5.35 }, | |
{ year: 2002, value: 2.72 }, | |
{ year: 2003, value: 2.29 }, | |
{ year: 2004, value: 4.83 }, | |
{ year: 2005, value: 6.52 }, | |
{ year: 2006, value: 5.49 }, | |
{ year: 2007, value: 2.90 }, | |
{ year: 2008, value: 8.26 }, | |
{ year: 2009, value: 4.22 }, | |
{ year: 2010, value: 3.79 }, | |
{ year: 2011, value: 4.65 }, | |
{ year: 2012, value: 3.17 }, | |
{ year: 2013, value: 2.6 }, | |
{ year: 2014, value: 3.6 }, | |
{ year: 2015, value: 0.7 }, | |
{ year: 2016, value: 1.3 }, | |
{ year: 2017, value: 2.9 }, | |
{ year: 2018, value: 4.5 } | |
] | |
inflation.each {|x| salary = salary + (salary * (x[:value] / 100))} | |
puts "Pero tito, yung salary mo noon, #{salary} ngayong 2018" | |
# > Pero tito, yung salary mo noon, 59392.98600422774 ngayong 2018 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment