public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine("N2: " + N2.ToString("0.0")); sb.AppendLine("Horas de estágio: " + HorasEstagio); return(base.ToString() + sb.ToString()); }
private void button2_Click(object sender, EventArgs e) { //投影系数 N1 = (Bu * w2 - Bw * u2) / (u1 * w2 - u2 * w1); N2 = (Bu * w1 - Bw * u1) / (u1 * w2 - u2 * w1); textBox4.Text = N1.ToString("0.00000"); textBox5.Text = N2.ToString("0.00000"); }
private void Form1_Load(object sender, EventArgs e) { N1 = 0; N2 = 0; div.Enabled = false; tbN1.Text = N1.ToString(); tbN2.Text = N2.ToString(); }
void Start() { SetDefault(); N1 = Random.Range(0, 9); N2 = Random.Range(0, 9); N3 = Random.Range(0, 9); N4 = Random.Range(0, 9); Debug.Log(N1.ToString() + " " + N2.ToString() + " " + N3.ToString() + " " + N4.ToString()); }
public override string GetEngineValues(string format, IFormatProvider provider, string delimeter) { string buf; buf = N1.ToString(format, provider) + delimeter + N2.ToString(format, provider) + delimeter + thruster.GetThrusterValues(engineNumber, delimeter); return(buf); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine("N2: " + N2.ToString("0.0")); sb.AppendLine("N3: " + N3.ToString("0.0")); sb.AppendLine("Responsável: " + Responsavel); return(base.ToString() + sb.ToString()); }
//Se requiere recibir el Random para evitar la misma informacion public clsProceso(Random R) { decimal N1, N2, Resultado; char Signo; OperacionEnum Op; N1 = R.Next(1, 100); N2 = R.Next(1, 100); Op = (OperacionEnum)R.Next(5); switch (Op) { case OperacionEnum.Suma: Signo = '+'; Resultado = N1 + N2; break; case OperacionEnum.Resta: Signo = '-'; Resultado = N1 - N2; break; case OperacionEnum.Multiplicacion: Signo = '*'; Resultado = N1 * N2; break; case OperacionEnum.Division: Signo = '/'; Resultado = N1 / N2; break; case OperacionEnum.Residuo: Signo = '%'; Resultado = N1 % N2; break; default: Signo = '?'; Resultado = 0; break; } this.Operacion = N1.ToString() + Signo + N2.ToString(); this.Resultado = Math.Round(Resultado, 4).ToString(); this.TME = this.TR = this.Servicio = R.Next(7, 18); this.Tamano = R.Next(7, 30); this.Estado = "Nuevo"; this.Numero = ++ID; this.Respuesta = -1; isCompleted = true; }
public static void ProvideRandDataSet(RichTextBox RTB) { int N1, N2, N3, N4, N5; Random random = new Random(); N1 = random.Next(0, 255); N2 = random.Next(0, 255); N3 = random.Next(0, 255); N4 = random.Next(0, 255); N5 = random.Next(0, 255); RTB.Text = N1.ToString() + ", " + N2.ToString() + ", " + N3.ToString() + ", " + N4.ToString() + ", " + N5.ToString(); }
public int GetInt() { return(int.Parse(N1.ToString() + "" + N2.ToString() + "" + N3.ToString() + "" + N4.ToString())); }
public string GetString() { return(N1.ToString() + "" + N2.ToString() + "" + N3.ToString() + "" + N4.ToString()); }
void pruebaCorridas(List <double> Xi) { int R, N1, N2; double Media, Desviacion, H, Z0; List <bool> Arriba = new List <bool>(); // Ver si estan arriba o abajo foreach (double x in Xi) { if (x < 0.5) { Arriba.Add(false); } else { Arriba.Add(true); } } R = numDeCorridas(Arriba); N1 = Arriba.FindAll(x => x == false).Count; N2 = Arriba.FindAll(x => x == true).Count; // Calcular media Media = 2 * N1 * N2; Media = Media / (N1 + N2); Media = Media + 1; // Calcular desviacion Desviacion = (2 * N1 * N2) - N1 - N2; Desviacion = 2 * N1 * N2 * Desviacion; Desviacion = Desviacion / (Math.Pow(N1 + N2, 2) * (N1 + N2 - 1)); Desviacion = Math.Sqrt(Desviacion); // Corrección para continuidad H = R < Media ? 0.5 : -0.5; // Valor estadístico Z0 Z0 = R + H - Media; Z0 = Z0 / Desviacion; lblR.Text = "R = " + R.ToString(); lblN1.Text = "N1 = " + N1.ToString(); lblN2.Text = "N2 = " + N2.ToString(); lblMedia.Text = "Media = " + Media.ToString(); lblDesviacion.Text = "Desviacion = " + Desviacion.ToString(); lblH.Text = "H = " + H.ToString(); lblZ.Text = "Z0 = " + Z0.ToString(); if (Z0 < -1.96) { lblResultado.Text = "Resultado\nZ0 < -1.96\n∴\nNo se comportan de manera aleatoria."; } else if (Z0 > 1.96) { lblResultado.Text = "Resultado\n1.96 < Z0\n∴\nNo se comportan de manera aleatoria."; } else { lblResultado.Text = "Resultado\n-1.96 ≤ Z0 ≤ 1.96\n∴\nSe comportan de manera aleatoria."; } }