switch(n){case1:return1;break;case2:return3;break;case3:return6;break;default:printf("n is too big to handle!\n");}