我无法想象下面我的代码有什么问题.
当我尝试编译时,我收到消息:
不包含适用于入口点的静态"主"方法.
这是我的代码:
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 RandomNumberGenerator
{
public partial class Form1 : Form
{
private const int rangeNumberMin = 1;
private const int rangeNumberMax = 3;
private int randomNumber;
public Form1()
{
randomNumber = GenerateNumber(rangeNumberMin, rangeNumberMax);
}
private int GenerateNumber(int min,int max)
{
Random random = new Random();
return random.Next(min, max);
}
private void Display(object sender, EventArgs e)
{
switch (randomNumber)
{
case 1: …Run Code Online (Sandbox Code Playgroud) using System;
public class Newton_Ralphson
{
public double compute(double x,int n,double[] P) // x, degree, coefficients
{
double pol = 0;
for (int i = 0;i < n;i++)
{
for (int j = 1; j < n - i; j++)
x *= x;
pol += P[n - i] * x;
}
pol += P[0];
return pol;
}
public double[] secondary_Pol(int n, double[] P) //slope
{
double[] secP = new double[n - 1];
for (int i = 0; i < n …Run Code Online (Sandbox Code Playgroud)