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

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

#define max 256
int count=0;
/*
* 加1后进位操作 
......................
阅读全部 | wp231957 贴于 2014年4月22日 15:52     hide bbsi
// 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;
......................
阅读全部 | wp231957 贴于 2014年4月22日 09:28     hide bbsi
#include<stdio.h>
int main()
{
   int a[20],i,n;

   for(i=0,n=1;i<20;n+1)
   if(n%3==2&&n%5==3&&n%7==4)
   {a[i]=n;printf("%d",a[i]);i++;}

   return 0;
}
阅读全部 | 岚月 贴于 2014年4月21日 18:09     hide bbsi
#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)
{
......................
阅读全部 | wp231957 贴于 2014年4月21日 16:24     hide bbsi
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)
......................
阅读全部 | wp231957 贴于 2014年4月21日 16:07     hide bbsi
clique_child clique_c = new clique_child( relation_members, member_num);
clique_c.traceback_find_clique();
Vector< Vector<Integer> >  vector_s = clique_c.get_vector_result();//vector_s 中得到所有的派系

for(int i = 0; i < vector_s.size(); i++){
int s = vector_s.elementAt(i).size();
System.out.printf("\n\n %d派系:",s );
for(int j = 0; j < vector_s.elementAt(i).size(); j++){
System.out.printf("%d  ", vector_s.elementAt(i).elementAt(j).intValue());
}
}

......................
阅读全部 | 晓雪儿1990 贴于 2014年4月21日 09:45     hide bbsi
#include<iostream>
using namespace std;
int fab(int n);
int main()
{
int n,y;
cout<<"please input a number:"<<endl;
cin>>n;
y=fab(n);
cout<<"n!="<<endl;
return 0;
}
......................
阅读全部 | 冰释芊芊 贴于 2014年4月19日 23:58     hide bbsi
#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;
......................
阅读全部 | wp231957 贴于 2014年4月16日 15:08     hide bbsi
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
typedef struct B{
    double array[5];
    struct B* next;
}A;
int main(void)
{
    A* current =NULL;
    A* top=NULL;
    A* before=NULL;
......................
阅读全部 | 郑李孔明 贴于 2014年4月14日 14:07     hide bbsi
//是输入6就会报错,为什么?

#include<iostream>
using namespace std;
#define sizem ((size / 2 - 1) / 2)
#define sizeh (size / 2)
#define sizesq (sizeh * sizeh)

void main()
{
int size = 0;    //魔方阵大小
int x = 0, y = 0;        //下一个数字所放的位置
......................
阅读全部 | 紫罗兰丹丹 贴于 2014年4月10日 20:39     hide bbsi
上一页 224 225 226 227 228 229 230 231 232 233 下一页