首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C语言
#include<stdio.h>
#include<string.h>
const int maxn = 3000;

int f[maxn];

int main()
{
   int i,j,n;
   memset(f,sizeof(f),0);
   scanf("%d",&n);
   f[0] = 1;
......................
阅读全部 | 邓士林 贴于 2013年10月4日 16:20     hide bbsi
#include <stdio.h>
 #include <stdlib.h>
 #define Listinitsize 10//表的空间大小为10
 typedef struct {
     int *elem;
     int length;//表的长度
     int listsize;
 }Sqlist;
 int InitList_Sq(Sqlist *L)
 {
     L->elem=(int *)malloc((Listinitsize) * sizeof(int));//申请动态空间
     if(! L->elem)
......................
阅读全部 | m4120575 贴于 2013年9月25日 22:05     hide bbsi
#include<stdio.h>
main()
{
int a;
int x;
for(a=1;x=11*a+4;a++)
{
if(x%3==2&&x%5==3&&x%7==5&&x%11==4)
{
printf("最少人数是:%d\n",x);
break;
}
......................
阅读全部 | jqk_89 贴于 2013年9月22日 17:49     hide bbsi
#include "stdio.h"
int main()
{
int year,month,data;
int n;
scanf("%d",&n);
while(n--)
{
int sum=0;
  scanf("%d%d%d",&year,&month,&data);
  int k=month;
  while(month--)
......................
阅读全部 | 邓士林 贴于 2013年9月17日 11:27     hide bbsi
#include<stdio.h>
int main()
{
int n,m,x,y,z,i,a[12]={31,29,31,30,31,30,31,31,30,31,30,31};
scanf("%d",&n);
while(n--)
{
m=0;
scanf("%d %d %d",&x,&y,&z);
for(i=0;i<y-1;i++)
{
m+=a[i];
......................
阅读全部 | 邓士林 贴于 2013年9月17日 11:15     hide bbsi
“韩信点兵”
有一队士兵,确切人数不知,但若每3人一组,则余2人;每5人一组,余3人;每7人一组,余5人;每11人一组,余4人。
问:至少有多少人? 

#include<stdio.h>
void main()
{
int n=2;
while(n%5!=3)
n=n+3;
while(n%7!=5)
n=n+15;
......................
阅读全部 | 爱编聪聪 贴于 2013年9月16日 21:25     hide bbsi
#include<stdio.h>
#define n 3
 typedef struct Student{
long lNum;
char cName[4];
float cGrade;
float cjjGrade;
float tGrade;
}Stu;

void main()
{
......................
阅读全部 | shaoshuai199 贴于 2013年9月8日 15:50     hide bbsi
这个代码编译时没有错,可是就是输出结果有错误,实在不知错在哪?新手求向高人求助!!!!
(#include<stdio.h>
#define n 3
 typedef struct Student{
long lNum;
char cName[4];
float cGrade;
float cjjGrade;
float tGrade;
}Stu;)这个是头文件的内容

#include"myhead.h"
......................
阅读全部 | 晨景 贴于 2013年9月8日 11:22     hide bbsi
#include <stdio.h>
#include <stdlib.h>
struct yuansu
{
    int data;
    struct yuansu *next;
};
struct yuansu *creat(void)
{
    struct yuansu *head,*p1,*p2;
    head=p1=(struct yuansu*)malloc(sizeof(struct yuansu));
    p2=(struct yuansu*)malloc(sizeof(struct yuansu));
......................
阅读全部 | 赵腾 贴于 2013年9月6日 23:59     hide bbsi
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
 int n;
 char a[12],b[1002];
 cin>>n;
 while(n--)
 {
 int i=0,j=0,count=0;
 cin>>a;
......................
阅读全部 | 邓士林 贴于 2013年9月6日 21:09     hide bbsi
上一页 128 129 130 131 132 133 134 135 136 137 下一页