ACA No.
MERILY DAYAN PULIDO PIRATOVA FICHA 51148
JORGE ADRIAN CARMONA VALBUENA FICHA 51148
SANTIAGO ALEJANDRO FAJARDO GIRALDO FICHA 51148
PROGRAMA INGENIERIA DE SISTEMAS, MODALIDAD VIRTUAL, CORPORACION
UNIFICADA DE EDUCACION SUPERIOR-CUN
ASIGNATURA:
PROGRAMACION AVANZADA
PRESENTADO A:
INGENIERO CAMILO AUGUSTO CARDONA PATIÑO
FECHA:
19 DE FEBRERO DE 2023
LINK GOOGLE DRIVE CON EJERCICIOS RESUELTOS EN VISUAL STUDIO:
https://drive.google.com/drive/folders/1bxbf9nuVq9EXJwr-9RtMvmX6pJzsMLnD?
usp=sharing
EJERCICIO A.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
private void Label1_Click(object sender, EventArgs e)
{
private void button1_Click(object sender, EventArgs e)
{
int edad;
edad = int.Parse(tBox_edad.Text);
if (edad < 16)
{
MessageBox.Show("Usted no puede ingresar,es menor de 16 años");
}
else if (edad >= 16 && edad < 21)
{
MessageBox.Show("Su ingreso es gratis");
}
else if (edad > 21)
{
MessageBox.Show("El valor de sun ingreso es $$$$$");
}
private void Btn_Otro_Click(object sender, EventArgs e)
{
int edad;
edad = int.Parse(tBox_edad.Text);
if (edad < 16)
{
MessageBox.Show("Usted no puede ingresar,es menor de 16 años");
}
else if (edad >=16)
{
MessageBox.Show("El valor de sun ingreso es $$$$$");
}
}
private void BtnSalir_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
EJERCICIO B.
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
private void btn_guardar_Click(object sender, EventArgs e)
{
if (textBox1.Text == "")
{
MessageBox.Show("el numero no es valido ,debe ser igual o
mayor que 2");
textBox1.Focus();
return;
}
int num1;
try
num1 = Convert.ToInt32(textBox1.Text);
}
catch(Exception)
{
num1 = 0;
}
if (num1 < 2)
{
MessageBox.Show("el numero no es valido debe ser igual o
mayor que 2");
textBox1.Focus();
return;
}
string fibo = Fibonacci(num1);
textBoxResultado.Text = fibo;
}
private string Fibonacci(int num1)
{
double a=0, y=1, z, w=1;
string fibo = string.Format("{0:N0}\t{1:N0}\t", a, y);
for (int i = 3; i <= num1; i++)
{
z = a + y;
fibo += String.Format("{0,20:N0}", z );
w += z;
a = y;
y = z;
}
return fibo;
private void Form1_Load(object sender, EventArgs e)
{
private void textBoxResultado_TextChanged(object sender, EventArgs e)
{
}
}
}
EJERCICIO C.
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//Analizar los dos primeros numeros en la secuencia
int oldNumber = 0;
int currentNumber = 1;
int n = int.Parse(intNumber.Text);
int resultado;
while(currentNumber < n)
{
//Calcula el siguiente numero agregado al valor actual al numero
anterior
resultado = currentNumber + oldNumber;
oldNumber = currentNumber;
currentNumber = resultado;
MessageBox.Show(currentNumber.ToString());
}
}
private void button1_Click_1(object sender, EventArgs e)
{
Application.Exit();
}
}
}