The problem is that I need to share variables between if statements without them going out of scope. This is what I\'ve written so far:
if
// if rate is