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

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
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)

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)

miércoles, 23 de febrero de 2011

progromacion de computadores

NELSON JULIAN PLATA RUIZ
DISEÑO Y ADMINISTRACION DE SISTEMAS
PROGRAMACION DE COMPUTADORES



1. TEMAS VISTOS EN CLASES

* VARIABLE: es un nombre para direcciones de memoria que sirven para almacenar valores
temporalmente

* reglas para poner nombre debe empezar con un caracter alfabetico o un guion abajo, no puede utilizar espacio ni simbolos




*1)
en la siguiente clase
se utilizo una forma de programar para q apareciera un resultado especificando
lo que se pide en la operacion
nombre
sueldo basico
total
lo que se pida
colocando
dim NOMBRE as sting
dim SUELDO as decimal
dim VENTAS as decimal
nombre = textbox1.text
sueldo = textbox2.text
ventas = textbox2.text
total = (venta*o.1) + sueldo
textbox4.text = nombre + " uste gano." + cstr(total)


TIPOS DE DATOS DE LAS VARIABLES

STING: texto

DATE: guardar fechas

NUMERICA :
INTEGER: entero
DOUBLE: punto decimal
SINGLE
BYTE: numerico pequeñas
DECIMAL: plata

2 DECLARAR UNA VARIABLE
dim numest as single
* se trabaja con visual studio 2010

pasos para empezar un archivo nuevo
archivo->nuevo->proyecto
windows

aplicacion de windows forms
dar nombre
aceptar

*label = letras: texto
*controles-> propiedades
->objetos

textbox: operaciones

*EVENTO : accion con el mouse o con el teclado

para programar el button para hacer una calculadora

*dim num1 as single
dim num2 as single
dim resultado as single
num1= textbox1.text
num2= textbox2.text
resultado= num1 + num2
textbox3.text= cstr (resultado)

CSTR : convierte un numero en texto