martes, 31 de marzo de 2009

PROGRAMA PARA VENTAS

1.- store space (30) to producto
2.- store space (4) to codigo
3.- store (0) to precio
store 0 to cantidad, T
cod= space (4)
use productos
clear
@ 5,5 say" introducir el codigo" get cod
read
locate for cod=zs005
@7,6 say" cantida comprada? "get cantidad
read
T=cantidad*precio
@9,5 say "producto:"
@9,20 producto
@10,5 say"total:"
@10,15 say T
wait

lunes, 30 de marzo de 2009

COMO CAMBIAR UN CICLO DO Y UNA INSTRUCCION IF/ELSE

use c\learnfox\emplist
clear
?
wait"Do you want the names capitalized(y\n)"To yesno
?
Do while.Not.Eof ()
If upper(yesno)="y"
?upper(Trim(fname)+""+Iname)
Else
?profer(Trim(fname)+""+Iname)
End if
Skip
Enddo
?
Use
Wait

PROGRAMA PARA HACER UN CICLO CON UNA BASE DE DATOS

use c:\learnfox\emplist
clear
?
?
Do while.Not.Eof ()
? proper(Trim(fname)+" "+ Iname)
skip
enddo
?
use
wait

lunes, 9 de marzo de 2009

PROGRAMA PARA CALCULAR EL VOLUMEN DE UN CIRCULO

STORE 0 TO R,H
STORE 3.1416 TO PI
CLEAR
@10,10 SAY"INTRODUCE EL RADIO"GET R
READ
@11,10 SAY"INTRODUCIR LA ALTURA"GET H
READ
V=PI*R*R*H
@14,10 SAY"V="
@14,13 SAY V
@14,30 SAY"U.CUBICAS"
WAIT







martes, 3 de marzo de 2009

lunes, 2 de marzo de 2009