INSTITUTO 9 DE JULIO - SAN MIGUEL DE TUCUMAN -NIVEL TERCIARIO - CARRERA DE ANALISTA DE SISTEMAS DE COMPUTACION

02 septiembre 2008

EJERCICIO (Botones de Radio + Boton de Comandos)

*-------------------------------------------------------------------------------------------
Ingresar un par de valores y haciendo uso de BOTONES DE COMANDOS (COMMAND BOTTOM)+ BOTONES DE RADIO (RADIO BOTTOM) permitir la posibilidad de realizar las 4 operaciones elementales.
*-------------------------------------------------------------------------------------------
clea
control=1
do while control=1
que=1
resul=0
op=1
store 0 to a,b
define windows ventana from 1,1 to 30,80 title "CARGA DE DATOS"
activate windows ventana
@ 1,1 say "Ingrese un numero :" font "arial,12"
@ 1,16 get a font "arial,10"
@ 4,1 say "Ingrese un numero :" font "arial,12"
@ 4,16 get b font "arial,10"
@ 8,1 get op function "*R SUMA;RESTA;MULTIPLICACION;DIVISION;SALIR" font arial,12"
@ 20,1 get que function "*H ACEPTAR;CANCELAR;SALIR" size 4,15,1 font "arial,10"
read cycle
if lastkey()=27
clea
deactivate windows ventana
exit
endif
do case
case que=1
do case
case op=1
resul=a+b
case op=2
resul=a-b
case op=3
resul=a*b
case op=4
resul=a/b
endcase
case que=2
loop
case que=3
exit
endcase
@ 16,1 say "RESULTADO :" + str(resul) font "arial,10"
wait "OPRIMA UNA TECLA PARA CONTINUAR....." windows
if lastkey()=27
exit
endif
enddo
deactivate windows ventana
clea
return
*-------------------------------------------------------------------------------------------