SEÑORES ESTUDIANTES AHÍ ESTA EL CÓDIGO Y EL DFD
ESTUDIAR MUCHO.
// PROGRAMA DIAS DE LA SEMANA CON SENTENCIA SECUENCIAL//
# include <stdio.h>
# include <conio.h>
int main()
{
int di;
printf("\t\tIngresar Un Numero Entero Entre 1....7\n ");
scanf("%d",&di);
if (di==1)
{
printf("\n\tES EL DIA LUNES....INICIO DE SEMANA");
}
else
if (di==2)
{
printf("ES EL DIA MARTES\n");
}
else
if (di==3)
{
printf(" ES EL DIA MIERCOLES\n");
}
else
if (di==4)
{
printf("ES EL DIA JUEVES\n");
}
else
if (di==5)
{
printf("ES EL DIA VIERNES\n");
}
else
if (di==6)
{
printf("ES EL DIA SABADO\n");
}
else
if (di==7)
{
printf(" ES EL DIA DOMINGO\n");
}
else // NO COLOCA EL IF PORUE NO HAY MAS CONDICIONES//
{
printf("LA OPCION NO EXISTE\n");
}
getch();
}
miércoles, 19 de marzo de 2014
martes, 18 de marzo de 2014
Evaluación Practica Para Tercer Año De Bachillerato
Señores estudiantes la evaluación practica esta bajo los siguientes parámetros.
2. Propiedades 3 puntos
3.- El Código 5 puntos
- la siguiente interfaces 2 puntos
2. Propiedades 3 puntos
- al ejecutar el programa todos los controles devén estar desactivados, excepto el botón de activado
- el formulario debe estar centrado
- el botón de maximizar desactivado
- una imagen debe estar en el centro del formulario
- devén haber colores de fondo del formulario y el textbox
- en la barra de titulo deberá constar el nombre de los integrantes
3.- El Código 5 puntos
- el botón activar deberá activar todos los controles
- los demás botones de comandos deberán actuar como el trabajo practico que se realizo ayer.
- cada ves que se de clic en el botón de Igual Los controles volverán a desactivarse.
- los resultados de la operaciones deberán ser correctos no
jueves, 6 de marzo de 2014
CODIGO TAREA EN VISUAL BASIC 2008
Queridos Estudiantes Les Dejo El Codigo Para Que Ustedes Creen La Interface Sobre Los Controles CheckBox. Saludos.
Public Class Form1
Dim a, b, c As Double
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If Me.CheckBox1.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a + b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If Me.CheckBox2.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a - b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If Me.CheckBox3.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a * b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
If Me.CheckBox4.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a / b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
If Me.CheckBox5.Checked = True Then
Me.Label1.Visible = False
Me.Label2.Visible = False
Me.Label5.Visible = True
Me.Label6.Visible = True
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a ^ b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
Me.Label1.Visible = True
Me.Label2.Visible = True
Me.Label5.Visible = False
Me.Label6.Visible = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TextBox1.Clear()
Me.TextBox2.Clear()
Me.TextBox3.Clear()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
QUERIDOS ESTUDIANTES QUIEN DISEÑE LA INTERFACES CORRECTA Y ME DIGA QUE HACE ESPECÍFICAMENTE EL SIGUIENTE CÓDIGO Y ME ENVIÉ LA RESPUESTA A MI CORREO HASTA EL SÁBADO ANTES DE LAS 6 DE LA MAÑANA TENDRÁ 10 PUNTOS EN PRACTICAS, SUERTE.
Public Class Form1
Dim dato1 As Double
Dim dato2 As Double
Dim resul As Double
Dim punto As Double
Dim opera As Double
Private Sub BT10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT0.Click
Me.TextBox1.Text = Me.TextBox1.Text & "0"
End Sub
Private Sub BTLIM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTLIM.Click
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BT7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT7.Click
Me.TextBox1.Text = Me.TextBox1.Text & "1"
End Sub
Private Sub BT8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT8.Click
Me.TextBox1.Text = Me.TextBox1.Text & "2"
End Sub
Private Sub BT9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT9.Click
Me.TextBox1.Text = Me.TextBox1.Text & "3"
End Sub
Private Sub BT4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT4.Click
Me.TextBox1.Text = Me.TextBox1.Text & "4"
End Sub
Private Sub BT5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT5.Click
Me.TextBox1.Text = Me.TextBox1.Text & "5"
End Sub
Private Sub BT6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT6.Click
Me.TextBox1.Text = Me.TextBox1.Text & "6"
End Sub
Private Sub BT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT1.Click
Me.TextBox1.Text = Me.TextBox1.Text & "7"
End Sub
Private Sub BT2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT2.Click
Me.TextBox1.Text = Me.TextBox1.Text & "8"
End Sub
Private Sub BT3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT3.Click
Me.TextBox1.Text = Me.TextBox1.Text & "9"
End Sub
Private Sub BT11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTPU.Click
Me.TextBox1.Text = Me.TextBox1.Text & "."
punto = 1
If punto = 1 Then
Me.BTPU.Enabled = False
End If
End Sub
Private Sub BTMULTI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTMULTI.Click
opera = 2
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTSUMA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTSUMA.Click
opera = 1
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTIGUAL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTIGUAL.Click
dato2 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
If opera = 1 Then
resul = (dato1 + dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 2 Then
resul = (dato1 * dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 3 Then
resul = (dato1 - dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 4 Then
resul = (dato1 / dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 5 Then
resul = (dato1 ^ dato2)
Me.TextBox1.Text = Str(resul)
End If
End If
End If
End If
End If
End Sub
Private Sub BTRESTA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTRESTA.Click
opera = 3
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTDIVI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTDIVI.Click
opera = 4
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTPO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTPO.Click
opera = 5
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
End Class
Public Class Form1
Dim a, b, c As Double
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If Me.CheckBox1.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a + b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If Me.CheckBox2.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a - b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If Me.CheckBox3.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a * b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
If Me.CheckBox4.Checked = True Then
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a / b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
End If
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
If Me.CheckBox5.Checked = True Then
Me.Label1.Visible = False
Me.Label2.Visible = False
Me.Label5.Visible = True
Me.Label6.Visible = True
a = Val(Me.TextBox1.Text)
b = Val(Me.TextBox2.Text)
c = (a ^ b)
Me.TextBox3.Text = Str(c)
Else
Me.TextBox3.Clear()
Me.Label1.Visible = True
Me.Label2.Visible = True
Me.Label5.Visible = False
Me.Label6.Visible = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TextBox1.Clear()
Me.TextBox2.Clear()
Me.TextBox3.Clear()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
QUERIDOS ESTUDIANTES QUIEN DISEÑE LA INTERFACES CORRECTA Y ME DIGA QUE HACE ESPECÍFICAMENTE EL SIGUIENTE CÓDIGO Y ME ENVIÉ LA RESPUESTA A MI CORREO HASTA EL SÁBADO ANTES DE LAS 6 DE LA MAÑANA TENDRÁ 10 PUNTOS EN PRACTICAS, SUERTE.
Public Class Form1
Dim dato1 As Double
Dim dato2 As Double
Dim resul As Double
Dim punto As Double
Dim opera As Double
Private Sub BT10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT0.Click
Me.TextBox1.Text = Me.TextBox1.Text & "0"
End Sub
Private Sub BTLIM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTLIM.Click
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BT7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT7.Click
Me.TextBox1.Text = Me.TextBox1.Text & "1"
End Sub
Private Sub BT8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT8.Click
Me.TextBox1.Text = Me.TextBox1.Text & "2"
End Sub
Private Sub BT9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT9.Click
Me.TextBox1.Text = Me.TextBox1.Text & "3"
End Sub
Private Sub BT4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT4.Click
Me.TextBox1.Text = Me.TextBox1.Text & "4"
End Sub
Private Sub BT5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT5.Click
Me.TextBox1.Text = Me.TextBox1.Text & "5"
End Sub
Private Sub BT6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT6.Click
Me.TextBox1.Text = Me.TextBox1.Text & "6"
End Sub
Private Sub BT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT1.Click
Me.TextBox1.Text = Me.TextBox1.Text & "7"
End Sub
Private Sub BT2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT2.Click
Me.TextBox1.Text = Me.TextBox1.Text & "8"
End Sub
Private Sub BT3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT3.Click
Me.TextBox1.Text = Me.TextBox1.Text & "9"
End Sub
Private Sub BT11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTPU.Click
Me.TextBox1.Text = Me.TextBox1.Text & "."
punto = 1
If punto = 1 Then
Me.BTPU.Enabled = False
End If
End Sub
Private Sub BTMULTI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTMULTI.Click
opera = 2
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTSUMA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTSUMA.Click
opera = 1
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTIGUAL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTIGUAL.Click
dato2 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
If opera = 1 Then
resul = (dato1 + dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 2 Then
resul = (dato1 * dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 3 Then
resul = (dato1 - dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 4 Then
resul = (dato1 / dato2)
Me.TextBox1.Text = Str(resul)
Else
If opera = 5 Then
resul = (dato1 ^ dato2)
Me.TextBox1.Text = Str(resul)
End If
End If
End If
End If
End If
End Sub
Private Sub BTRESTA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTRESTA.Click
opera = 3
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTDIVI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTDIVI.Click
opera = 4
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
Private Sub BTPO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTPO.Click
opera = 5
dato1 = Val(Me.TextBox1.Text)
Me.TextBox1.Clear()
Me.BTPU.Enabled = True
End Sub
End Class
Suscribirse a:
Entradas (Atom)