将下面的C#代码转换成C代码,急急急急,万分感谢啊
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static double ApplyFuzzyOperation(double a,double b)
{
return Math.Min(a, b);
}
static void Main(string[] args)
{
while (true)
{
//模糊规则
//if e is E_NB and ec is EC_NB, then u is U_NB
//if e is E_PB and ec is EC_PB, then u is U_PB
//定义模糊集合
FuzzySet_Guass U_NB = new FuzzySet_Guass(3, -10, -10, 10, 1001, "U_NB");
FuzzySet_Guass U_PB = new FuzzySet_Guass(3, 10, -10, 10, 1001, "U_PB");
FuzzySet_Guass E_NB = new FuzzySet_Guass(3, -10, -10, 10, 1001, "E_NB");
FuzzySet_Guass E_PB = new FuzzySet_Guass(3, 10, -10, 10, 1001, "E_PB");
FuzzySet_Guass EC_NB = new FuzzySet_Guass(3, -10, -10, 10, 1001, "EC_NB");
FuzzySet_Guass EC_PB = new FuzzySet_Guass(3, 10, -10, 10, 1001, "EC_PB");
//输入误差e和误差变化率ec
Console.Write("e=");
double input1 = Convert.ToDouble(Console.ReadLine());
Console.Write("ec=");
double input2 = Convert.ToDouble(Console.ReadLine());
//step1
double e1 = E_NB.FuzzifyInput(input1);
d
相关问答:
为什么C写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?
1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......
#include <stdio.h>
#include <graphics.h>
void main()
{
int x0,y0,x1,y1,driver,mode,i;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,&qu ......
想知道每条指令或函数的系统消耗。比如系统执行int a=0;的开销是多少。有没有类似的文档之类的。不要和我说用什么clock()函数来测试。我想要相关总结好的文档
先反汇编,然后拿着cpu的指令手册查每条指令的时间周期 ......
//C 接口
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......
内容涉及:C、C++、STL、VC++、MFC、COM、ATL、Windows网络编程、数据库编程、Windows驱动编程、软件工程、Windows操作系统编程,等等方面。
下载地址:http://www.cctry.com/forumdisplay.php?fid=46
......