Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Fidel practica final programacion orientada a odjeto
1. using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PROYECTO_2
{
public partial class Form1 : Form
{
public string[] nombres;
public decimal[] sueldos;
public int f=0;
public decimal suel=0;
public string nombre;
public Form1()
{
InitializeComponent();
}
public void MayorSueldo()
{
decimal mayor;
int pos;
mayor = sueldos[0];
pos = 0;
for (int f = 1; f < nombres.Length; f++)
{
if (sueldos[f] > mayor)
{
mayor = sueldos[f];
pos = f;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
2. nombres = new string[5];
sueldos = new decimal[5];
if (f == 5)
{
button1.Enabled = false;
//decimal mayor;
//int pos;
//mayor = sueldos[0];
//pos = 0;
//for (int f = 1; f < nombres.Length; f++)
//{
// if (sueldos[f] > mayor)
// {
// mayor = sueldos[f];
// pos = f;
// }
//}
label8.Text = nombre;
label10.Text = suel.ToString();
}
else
{
nombres[f] = textBox1.Text;
sueldos[f] = Convert.ToDecimal(textBox2.Text);
if (sueldos[f] > suel)
{
suel = sueldos[f];
nombre = nombres[f];
}
ListViewItem lista = listView1.Items.Add(nombres[f]);
lista.SubItems.Add(sueldos[f].ToString());
f++;
}
}
private void button4_Click(object sender, EventArgs e)
{