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