//=================================================================C // Test Program of C=A+B for 2-Type C //-----------------------------------------------------------------C // Written by Yasunori Ushiro, 2007/04/08 C // ( Kanagawa University ) C //=================================================================C #include #include // Main Program void main () { int IA, IB, IC, ID ; double DA, DB, DC ; LP: printf("Type In (1:int, 2:double, 0:end \n") ; scanf("%d",&ID) ; if(ID >= 1) { printf("Type In A, B \n") ; if(ID == 1) { // Integer ADD scanf("%d %d",&IA,&IB) ; IC = IA + IB ; printf("C= %d \n",IC) ; } else { // Double ADD scanf("%lf %lf",&DA,&DB) ; DC = DA + DB ; printf("C= %lf \n",DC) ; } goto LP; } }