Update cal.cpp

added new cube function