*
if ( ventas >=3000000) then
valcomision = ventas * comision/100
textbox3.text = "comision = " + cstr ( valcomision)
else
textbox3.text = " ventas inferiores a 3000000 "
end if
*
dim num as single
dim sumapar a integer
dim suminpar as single
dim suma as single
textbox1.text = num
for 1 = 1 to num
suma + i
next i
for j = 2 to num step2
sumapar + = j
nextj
for z = 1 to num step2
suminpar t = z
next z
lunes, 9 de mayo de 2011
* dim num1 as single
dim num2 as single
num1 = textbox1.text
num2 = and cint((6*indc))+1)
textbox2.text = cstr(num2)
if ( num1<=num2) then
textbox3.text= " perdio"
else
textbox3.text = " gano"
end if
*
dim LA as single
dim LB as single
dim LC as single
LA = textbox1.text
LB = textbox2.text
LC = textbox3.text
if (( LA = LB ) and ( LB = LC )) then
textbox4.text = " equilatero"
else
if (( LA <>LB) and (LA<>LC) and (LB<>LC)) then
textbox4.text = "escaleno"
else
textbox4.text = "isoseles"
end if
end if
dim num2 as single
num1 = textbox1.text
num2 = and cint((6*indc))+1)
textbox2.text = cstr(num2)
if ( num1<=num2) then
textbox3.text= " perdio"
else
textbox3.text = " gano"
end if
*
dim LA as single
dim LB as single
dim LC as single
LA = textbox1.text
LB = textbox2.text
LC = textbox3.text
if (( LA = LB ) and ( LB = LC )) then
textbox4.text = " equilatero"
else
if (( LA <>LB) and (LA<>LC) and (LB<>LC)) then
textbox4.text = "escaleno"
else
textbox4.text = "isoseles"
end if
end if
lunes, 2 de mayo de 2011
*
if textbox1.text >=5000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = "lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
if programa = "s" then
textbox2.text = " ah bueno otro dia "
else
textbox2.text = "nos vamos a tomar cerveza"
end if
else
textbox2.text = "pailas no hay dinero"
end if
if textbox1.text >=5000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = "lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
if programa = "s" then
textbox2.text = " ah bueno otro dia "
else
textbox2.text = "nos vamos a tomar cerveza"
end if
else
textbox2.text = "pailas no hay dinero"
end if
DATOS
Matrices
dim nombre(4) as string
dim edad(4) as single
nombre(1) = textbox1.text
nombre(2) = textbox2.text
nombre(3) = textbox3.text
nombre(4) = textbox4.text
edad(1) = textbox5.text
edad(2) = textbox6.text
edad(3) = textbox7.text
edad(4) = textbox8.text
if textbox9.text = 1 then
textbox10.text = "nombre:"+nombre(1)+vbcrlf+"edad:"+cstr(edad(1))
se escribe 3 veses mas cambiando le el numero de de nombre edad
* dim datos(4.2) as string
datos(0,0) = textbox1.text
datod(1.0) = textbox2.text
datos(2.0) = textbox3.text
datod(3.0) = textbox4.text
datos(0.1) = textbox5.text
datos(1.1) = textbox6.text
imprime = opcion -1
textbox10.text = "nombre:"+datos(imprime,0)+vbcrlf+"edad"+ datos (imprime,1)
Matrices
dim nombre(4) as string
dim edad(4) as single
nombre(1) = textbox1.text
nombre(2) = textbox2.text
nombre(3) = textbox3.text
nombre(4) = textbox4.text
edad(1) = textbox5.text
edad(2) = textbox6.text
edad(3) = textbox7.text
edad(4) = textbox8.text
if textbox9.text = 1 then
textbox10.text = "nombre:"+nombre(1)+vbcrlf+"edad:"+cstr(edad(1))
se escribe 3 veses mas cambiando le el numero de de nombre edad
* dim datos(4.2) as string
datos(0,0) = textbox1.text
datod(1.0) = textbox2.text
datos(2.0) = textbox3.text
datod(3.0) = textbox4.text
datos(0.1) = textbox5.text
datos(1.1) = textbox6.text
imprime = opcion -1
textbox10.text = "nombre:"+datos(imprime,0)+vbcrlf+"edad"+ datos (imprime,1)
miércoles, 23 de marzo de 2011
dim usuarios(4) as string
usuarios(0) = textbox1.text
usuarios(1) = textbox2.text
usuarios(2) = textbox3.text
usuarios(3) = textbox4.text
textbox5.text = usuarios(0) + vbcrlf + usuarios(1) + vbcrlf + usuarios(2) + vbcrlf + usuarios(3)
+ vbcrlf
condisiones if textbox9.text = 1 then
textbox10.text = "nombre:" + nombres(1) + vbcrlf + "edad:" + cstr(edad(1)) end if
lunes, 14 de marzo de 2011
funciones de conversiones
y = f(x) = 1+2
y = f(3) = 5
y = cstr(x)
y = variable sting
*label.text=
textbox.text = cstr (50)
cuando tengo que hacer una conversion :
cuando al otro lado del igual haga un text , cstr
*cint ( )
cint ("55") Numero entero
cabl ("55.32")
cdate ("03/03/2011")
*matrices /arrays ( arreglo )
dim nombre1 as string
dim nombre2 as string
dim nombres(50) as string
cantidad o mayor indice
nombres(3) = "juanita"
MATRICES:
es una secuencia de elementos con los datos del mismo tipo se acceden por el nombre de la matrix
y un indice qie empiesa en 0
lunes, 7 de marzo de 2011
nuevos trabajos en clase
dim nombre as sting
dim sueldo as decimal
nombre = textbox1.text
sueldo = textbox2.text
label3.text=nombre+"usted gano" + cstr (sueldo)
private sub ->subrutina
button1_->objeto
click->evento
dim nombre as sting
dim sueldo as decimal
dim ventas as decimal
dim total as decimal
nombre = textbox1.text
sueldos = textbox.text
ventas = textbox3.text
total = (venta*0.1)+ sueldo
textbox4.text=nombre+",usted gano," + cstr (total)
Suscribirse a:
Entradas (Atom)