simple procedural calculator