首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴wp231957的代码贴全部
int index=0;
void dec2yyy(int yyy,int source,char* bin)
{
    if(source==0) return;
    dec2yyy(yyy,source/yyy,bin);
    if((source%yyy)<10) bin[index]=(char)(source%yyy+0x30);
    else bin[index]=(char)(source%yyy+0x37);
    index++;
}
阅读全部 | 2013年3月15日 09:07
#include <stdio.h>

int main(void)
{
    _int64 dest[30000]={0};
    int index=0;
    char tmp;
    FILE* stream;
    stream = fopen("d:\\test.txt", "rb");
    if( stream == NULL )
        printf( "The file test.txt was not opened\n" );
    else
......................
阅读全部 | 2013年3月6日 14:01
#include <stdio.h>

void count_w(char* source,int* sum_num,int* sum_char,int* sum_space)
{
while(*source!='\0')
{
if(*source>='a' && *source<='z') (*sum_char)++;
if(*source>='A' && *source<='Z') (*sum_char)++;
if(*source>='0' && *source<='9') (*sum_num)++;
if(*source==0x20) (*sum_space)++;
source++;
}
......................
阅读全部 | 2013年3月6日 09:25
#include <objbase.h>
#include <stdio.h>
#pragma comment(lib,"ole32.lib")

//需要链接ole32.lib  需要引用objbase.h
const char* newGUID()
{
static char buf[64] = {0};
GUID guid;
if (S_OK ==CoCreateGuid(&guid))
{
_snprintf(buf, sizeof(buf)
......................
阅读全部 | 2013年3月4日 08:43
#include <time.h>
clock_t start,finish;
start=clock();
......
......
finish=clock();
printf("%.3lf\n",((double)finish-start)/1000);
阅读全部 | 2013年2月27日 19:54
for(b = e, c = f; d = b % c; b = c, c = d);

求e、f的最大公约数  c即答案
阅读全部 | 2013年2月27日 14:23
#include<stdio.h>

int i=0;
void dec2yyy(int yyy,int source,char* bin)
{
    if(source==0) return;
    dec2yyy(yyy,source/yyy,bin);
    if((source%yyy)<10) bin[i]=(char)(source%yyy+0x30);
    else bin[i]=(char)(source%yyy+0x37);
    i++;
}

......................
阅读全部 | 2013年2月25日 09:36
// nongli.cpp : 定义 DLL 应用程序的导出函数。
//

#include "stdafx.h"
#include "nongli.h"
#include <string.h>
#include <stdio.h>
#include <string.h>

#define days1800  341
int nongli[]=
{
......................
阅读全部 | 2013年1月16日 16:40
procedure  n_con_g(nyear:integer;nmonth:integer;nday:integer;niyear:pinteger;nimonth:pinteger;niday:pinteger)
                   stdcall;external 'd:\nongli.dll';
procedure  g_con_n(syear:integer;smonth:integer;sday:integer;niyear:pchar;nimonth:pchar;niday:pchar)
                   stdcall;external 'd:\nongli.dll';
procedure TForm1.Button4Click(Sender: TObject);
var
  syear: array[0..10]of char;
  smonth:array[0..10]of char;
  sday:  array[0..10]of char;
  iyear: integer;
  imonth:integer;
  iday:  integer;
......................
阅读全部 | 2013年1月15日 10:36
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <string.h>
#include "StdAfx.h"
#define days1800  341
int nongli[]=
{
    /*************************************** 
    * 农历1800-2100年大月小月与闰月 * 
    * (连同111个闰月在内共3723个月) * 
    * 公元1800-01-01为腊月(大)初七 * 
......................
阅读全部 | 2013年1月13日 12:33
上一页 6 7 8 9 10 11 12 13 14 15 下一页
wp231957