clc //Initialization of variables p=3 c=2 //calculations f=2-p+c //results printf("no. of degrees of freedom = %d ",f)