Create calc.cpp

This is for B3 batch.