求助:C代码改写成VB代码 - VB / 基础类
谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g[]);
int gau(float x[],float g[],int kg)
{ int i;
constraint(x,g);
for(i=0;i<kg;i++)
{
if(g[i]<0)
goto s333;
}
return 1;
s333:return 0;
}
void xcent(int n,int k,int ll,int lh,float x0[],float xcom[][100])
{ int i,l;
float xs;
for(i=0;i<n;i++)
{
xs=0;
for(l=0;l<ll;l++)
{
if(l!=lh)
xs=xs+xcom[i][l];
}
if(lh>-1)
x0[i]=xs/(ll-1);
else
x0[i]=xs/ll;
}
}
void fxse(int n,int k,float x[],float xcom[][100],float fxk[])
{
int l,lp,lp1,i;
float w;
for(l=0;l<k-1;l++)
for(lp=0;lp<k-l;lp++)
{
lp1=lp+1;
if(fxk[lp]<=fxk[lp1])
{
w=fxk[lp];
fxk[lp]=fxk[lp1];
fxk[lp1]=w;
for(i=0;i<n;i++)
{
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
SHIFT加F10与那个键右ctrl边上的那个键功能一样,想屏这个
但不知要怎么写那个组合键!
有没哪个大侠放一段这个的代码或写一段
http://topic.csdn.net/u/20090609/15/7dc9fb70-243f-4070-9cfd-34e48b66e6c6.html
......
怎么把已知的数据保存成xml文件,现在已知的数据是
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o=& ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......