LOCAL Z1,Z2,Z3,P,L1,A,B,C; //Indica que no ocuparn memoria
LOCAL D; INPUT({{P,{"Tensin","Impedancia","Corriente"}}},"Seleccin","Elige:","Qu parmetro des ea hallar"); // Asigna a esos nombres valores(0,1,2,...) IF P==0 THEN INPUT({{L1,[6]}},"Ingrese valores","Datos","Ingresa datos ordenados en la forma: {I,Z}"); IF SIZE(L1)<3 THEN Z1:=L1(1)*L1(2); A:=ABS(Z1); B:=ARG(Z1); C:=RE(Z1); D:=IM(Z1); PRINT("La Tensin en Voltios es: "+A+""+B); PRINT("o: "+C+"+"+D+"*i"); ELSE PRINT("Ingrese slo dos datos"); END; END; IF P==1 THEN INPUT({{L1,[6]}},"Ingrese valores","Datos","Ingresa datos ordenados en la forma: {V,I}"); IF SIZE(L1)<3 THEN Z3:=L1(1)/L1(2); A:=ABS(Z3); B:=ARG(Z3); C:=RE(Z3); D:=IM(Z3); PRINT("La Impedancia en Ohms: "+A+""+B); PRINT("o: "+C+"+"+D+"*i"); ELSE PRINT("Ingrese slo dos datos"); END; END; IF P==2 THEN INPUT({{L1,[6]}},"Ingrese valores","Datos","Ingresa datos ordenados en la forma: {V,Z}"); IF SIZE(L1)<3 THEN Z2:=L1(1)/L1(2); A:=ABS(Z2); B:=ARG(Z2); C:=RE(Z2); D:=IM(Z2); PRINT("La Corriente en Amps: "+A+""+B); PRINT("o: "+C+"+"+D+"*i"); ELSE PRINT("Ingrese slo dos datos"); END; END;