首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴wp231957的代码贴C语言
void stracc(char* dest)
{
int len=strlen(dest);
int flag=0;
int tmp;
len--;
flag=(dest[len]-0x30+1) /10;
dest[len]=(dest[len]-0x30+1) %10+0x30;
while(len>0)
{
len--;
tmp=dest[len]-0x30+flag;
......................
阅读全部 | 2014年3月21日 10:59
void strpre(char* dest,int sum)
{
char buffer[256]={'\0'};
strcpy(buffer,dest);
while(sum>0)
{
*dest++='0';
sum--;
}
int i=0;
while(buffer[i]!='\0') *dest++=buffer[i++];
}
阅读全部 | 2014年3月21日 10:59
#include <stdio.h>
#include <string.h>

void stralign(char* dest1,char* dest2,char sfill)
{
char buffer[256]={'\0'};
int len1=strlen(dest1);
int len2=strlen(dest2);
if (len1==len2) return;
int bc=0;
int i=0;
if(len1>len2) 
......................
阅读全部 | 2014年3月21日 09:10
#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h> 

void swap(char *a,char *b) 

char t; 
t = *a; 
*a = *b; 
*b = t; 

void print(char *a,int length,int* t) 
......................
阅读全部 | 2014年3月6日 13:15
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>

void dec2yyy(int source,char* bin)
{
bin[8]='\0';
int j=7;
    while(source>0)
{
bin[j]=source %2+0x30;
......................
阅读全部 | 2014年3月1日 14:57
// t5.cpp : 定义控制台应用程序的入口点。
//
#define _CRT_SECURE_NO_WARNINGS


#include <stdio.h>
#include <string.h>

int main()
{
FILE* pfile;
int rows[20000][2];
......................
阅读全部 | 2014年3月1日 12:23
#define _CRT_SECURE_NO_WARNINGS


#include <stdio.h>                   
#include <string.h>
#include <malloc.h>

int main()
{
int i,j=0;
char* buf[7];
int  jie[7][5];
......................
阅读全部 | 2014年2月27日 16:50
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main()
{    
char buf[512]={'\0'};
char ch;
int ptr=0;
int flag=0;
......................
阅读全部 | 2014年2月26日 16:09
#include<stdio.h>
#include<stdlib.h>

int gcd(int x,int y)  
//欧几里得辗转相除法求两数的最大的公约数
{
    if(x<y)    return gcd(y,x);
    if(x%y!=0) return gcd(y,x%y);
    else return y;
}

void cal_formul(char* x,char* y,char* z)
......................
阅读全部 | 2014年2月25日 21:42
int gcd(int x,int y)   
//欧几里得辗转相除法求两数的最大的公约数
{
if(x<y) return gcd(y,x);
if(x%y!=0) return gcd(y,x%y);
else return y;
}
阅读全部 | 2014年2月25日 15:24
上一页 2 3 4 5 6 7 8 9 10 11 下一页
wp231957