求指教,C#的键盘输入怎么给变量赋值?
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 实验节点导纳矩阵
{
class Program
{
static void Main(string[] args)
{
int i, j,n, ZLS;
float r, x, k, y;
double[,] ZL = new double[100, 6];
double[] GII = new double[100];
double[] BII = new double[100];
double[,] Y = new double[100,100];
int[] YDS = new int[100];
int[] YDZ = new int[100];
Console.Write("请输入节点个数:"+n);//这是从键盘中输入一个数值比如说5,然后赋给变量n,用C#怎么写语句呢
Console.Write("请输入支路数:"+ZLS);//这是从键盘中输入一个数值比如说5,然后赋给变量ZLS,用C#怎么写语句呢
for (int L = 1; L <=ZLS; L++)
{
scanf("%lf,%lf,%lf,%lf,%lf,%lf",&ZL[L][1],&ZL[L][2],&ZL[L][3],&ZL[L][4],&ZL[L][5],&ZL[L][6]);//这是用C++从键盘输入数据,变换成C#怎么写啊
i = (int)ZL[L,1];/*把上面输入的数值循环付给变量
j = (int)ZL[L,2];
r =(float)ZL[L,3];
x = (float)ZL[L,4];
k = (float)ZL[L,5];
y = (float)ZL[L,6];
if (i*j>0)