方程式に問題があるようです。次のような問題を解決したいのですZ= A/(C*B)
が、計算すると、プログラムが出力するA
値を何度変更しても、F/G(i.e A=F/G)
同じ答えが得られるようです。数学的には正しくありません。私のコードA
Z
A
Z
A=4/2
2
Z = 2/(8*1)
0.25
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace trafic_model
{
public partial class Form1 : Form
{
double a = 0, b = 0;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//С1
a = Convert.ToDouble(textBox1.Text) / Convert.ToDouble(textBox2.Text);
label3.Text = "C1 = " + a.ToString() + " Мбит/с.";
//end of c1
//N1
z = (a / (Convert.ToDouble(textBox3.Text) * Convert.ToDouble(textBox5.Text)));
label6.Text = "N1 = " + a.ToString() ;
//
}
}