首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴wp231957的代码贴C语言
// w3.cpp : 定义控制台应用程序的入口点。
//

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

#define max 256
int count=0;
/*
* 加1后进位操作 
......................
阅读全部 | 2014年4月22日 15:52
// w3.cpp : 定义控制台应用程序的入口点。
//

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char* argv[])
{
srand((unsigned)time(NULL));
char b[]={"ACGT"};
FILE* pfile;
......................
阅读全部 | 2014年4月22日 09:28
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int count=0;

/*
 * 加1后进位操作 
 * 用字符串模拟数字的进位操作
 */
void add_one(int *array, int array_len, int radio, int *flow)
{
......................
阅读全部 | 2014年4月21日 16:24
int ElemCount = 0;

// 交换元素
void swap(char *a, char *b) 
{
char tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
// 递归全排列
void perm(char c[], int s, int e)
......................
阅读全部 | 2014年4月21日 16:07
#include <stdio.h>
#include <malloc.h>

void prn_year(int year)
{
int t1,t2,t3,t4;
t1 = year        % 10;
t2 = (year/10  ) % 10;
t3 = (year/100 ) % 10;
t4 = (year/1000) % 10;
char* cy[5][10];
int i;
......................
阅读全部 | 2014年4月16日 15:08
执行以下相应的命令:


view sourceprint?
01 rem 英文  

02 chcp 437  

03    

04 rem 日文  

......................
阅读全部 | 2014年3月31日 21:18
// w1.cpp : 定义控制台应用程序的入口点。
//
#include <stdio.h>
#include <string.h>
#include <malloc.h>

//字符串右对齐 前导0补齐
void stralignr(char* dest,int slen)
{
char buffer[256]={'\0'};
int len1=strlen(dest);
if(len1>=slen) return;
......................
阅读全部 | 2014年3月28日 08:19
// w1.cpp : 定义控制台应用程序的入口点。
//

#include <stdio.h>
#include <string.h>
#include <malloc.h>
//补前导0
void strpre(char* dest,int sum)
{
char buffer[256]={'\0'};
strcpy(buffer,dest);
while(sum>0)
......................
阅读全部 | 2014年3月27日 16:43
// w1.cpp : 定义控制台应用程序的入口点。
//

#include <stdio.h>
#include <string.h>
//补前导0
void strpre(char* dest,int sum)
{
char buffer[256]={'\0'};
strcpy(buffer,dest);
while(sum>0)
{
......................
阅读全部 | 2014年3月26日 15:19
#include <stdio.h>
#include <string.h>
void strpre(char* dest,int sum)
{
char buffer[256]={'\0'};
strcpy(buffer,dest);
while(sum>0)
{
*dest++='0';
sum--;
}
int i=0;
......................
阅读全部 | 2014年3月21日 11:00
上一页 1 2 3 4 5 6 7 8 9 10 下一页
wp231957