环球第一吧 关注:55贴子:5,656
  • 13回复贴,共1

【编程教学】经典c程序100例

只看楼主收藏回复

【程序1】
题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去掉不满足条件的排列。 
main()
{
int i,j,k;
printf("\n");
for(i=1;i<5;i++)    /*以下为三重循环*/
 for(j=1;j<5;j++) 
  for (k=1;k<5;k++)
   {
    if (i!=k&&i!=j&&j!=k)    /*确保i、j、k三位互不相同*/
    printf("%d,%d,%d\n",i,j,k);
   }
}
【程序2】
题目:企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%;20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%;60万到100万之间时,高于60万元的部分,可提成1.5%,高于100万元时,超过100万元的部分按1%提成,从键盘输入当月利润I,求应发放奖金总数?
1.程序分析:请利用数轴来分界,定位。注意定义时需把奖金定义成长整型。      
main()
{
long int i;
int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;
scanf("%ld",&i);
bonus1=100000*0.1;bonus2=bonus1+100000*0.75;
bonus4=bonus2+200000*0.5;
bonus6=bonus4+200000*0.3;
bonus10=bonus6+400000*0.15;
 if(i<=100000)
  bonus=i*0.1;
 else if(i<=200000)
     bonus=bonus1+(i-100000)*0.075;
    else if(i<=400000)
        bonus=bonus2+(i-200000)*0.05;
       else if(i<=600000)
           bonus=bonus4+(i-400000)*0.03;
          else if(i<=1000000)
              bonus=bonus6+(i-600000)*0.015;
             else
              bonus=bonus10+(i-1000000)*0.01;
printf("bonus=%d",bonus);

【程序3】
题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
1.程序分析:在10万以内判断,先将该数加上100后再开方,再将该数加上268后再开方,如果开方后的结果满足如下条件,即是结果。请看具体分析:
2.程序源代码:
#include "math.h"
main()
{
long int i,x,y,z;
for (i=1;i<100000;i++)
 { x=sqrt(i+100);   /*x为加上100后开方后的结果*/
  y=sqrt(i+268);   /*y为再加上168后开方后的结果*/
   if(x*x==i+100&&y*y==i+268)/*如果一个数的平方根的平方等于该数,这说明此数是完全平方数*/
    printf("\n%ld\n",i);
 }
}
【程序4】
题目:输入某年某月某日,判断这一天是这一年的第几天?
1.程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊情况,闰年且输入月份大于3时需考虑多加一天。
2.程序源代码:
main()
{
int day,month,year,sum,leap;
printf("\nplease input year,month,day\n");
scanf("%d,%d,%d",&year,&month,&day);
switch(month)/*先计算某月以前月份的总天数*/
{
 case 1:sum=0;break;
 case 2:sum=31;break;
 case 3:sum=59;break;
 case 4:sum=90;break;
 case 5:sum=120;break;
 case 6:sum=151;break;
 case 7:sum=181;break;
 case 8:sum=212;break;
 case 9:sum=243;break;
 case 10:sum=273;break;
 case 11:sum=304;break;
 case 12:sum=334;break;
 default:printf("data error");break;
}
sum=sum+day;  /*再加上某天的天数*/
 if(year%400==0||(year%4==0&&year%100!=0))/*判断是不是闰年*/
  leap=1;
 else
  leap=0;
if(leap==1&&month>2)/*如果是闰年且月份大于2,总天数应该加一天*/



1楼2007-01-18 06:48回复
    driver=VGA;mode=VGAHI;
    initgraph(&driver,&mode,"");
    setbkcolor(YELLOW);
    x0=263;y0=263;y1=275;x1=275;
    for(i=0;i<=18;i++)
    {
    setcolor(1);
    rectangle(x0,y0,x1,y1);
    x0=x0-5;
    y0=y0-5;
    x1=x1+5;
    y1=y1+5;
    }
    settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
    outtextxy(150,40,"How beautiful it is!");
    line(130,60,480,60);
    setcolor(2);
    circle(269,269,137);
    }
    ==============================================================
    【程序59】
    题目:画图,综合例子。
    1.程序分析:
    2.程序源代码:
    # define PAI 3.1415926
    # define B 0.809
    # include "graphics.h"
    #include "math.h"
    main()
    {
    int i,j,k,x0,y0,x,y,driver,mode;
    float a;
    driver=CGA;mode=CGAC0;
    initgraph(&driver,&mode,"");
    setcolor(3);
    setbkcolor(GREEN);
    x0=150;y0=100;
    circle(x0,y0,10);
    circle(x0,y0,20);
    circle(x0,y0,50);
    for(i=0;i<16;i++)
    {
     a=(2*PAI/16)*i;
     x=ceil(x0+48*cos(a));
     y=ceil(y0+48*sin(a)*B);
     setcolor(2); line(x0,y0,x,y);}
    setcolor(3);circle(x0,y0,60);
    /* Make 0 time normal size letters */
    settextstyle(DEFAULT_FONT,HORIZ_DIR,0);
    outtextxy(10,170,"press a key");
    getch();
    setfillstyle(HATCH_FILL,YELLOW);
    floodfill(202,100,WHITE);
    getch();
    for(k=0;k<=500;k++)
    {
     setcolor(3);
     for(i=0;i<=16;i++)
     {
      a=(2*PAI/16)*i+(2*PAI/180)*k;
      x=ceil(x0+48*cos(a));
      y=ceil(y0+48+sin(a)*B);
      setcolor(2); line(x0,y0,x,y);
     }
     for(j=1;j<=50;j++)
     {
      a=(2*PAI/16)*i+(2*PAI/180)*k-1;
      x=ceil(x0+48*cos(a));
      y=ceil(y0+48*sin(a)*B);
      line(x0,y0,x,y);
     }
    }
    restorecrtmode();
    }
    ==============================================================
    【程序60】
    题目:画图,综合例子。   
    1.程序分析:
    2.程序源代码:
    #include "graphics.h"
    #define LEFT 0
    #define TOP 0
    #define RIGHT 639
    #define BOTTOM 479
    #define LINES 400
    #define MAXCOLOR 15
    main()
    {
    int driver,mode,error;
    int x1,y1;
    int x2,y2;
    int dx1,dy1,dx2,dy2,i=1;
    int count=0;
    int color=0;
    driver=VGA;
    mode=VGAHI;
    initgraph(&driver,&mode,"");
    x1=x2=y1=y2=10;
    dx1=dy1=2;
    dx2=dy2=3;
    while(!kbhit())
    {
     line(x1,y1,x2,y2);
     x1+=dx1;y1+=dy1;
     x2+=dx2;y2+dy2;
     if(x1<=LEFT||x1>=RIGHT)
     dx1=-dx1;
     if(y1<=TOP||y1>=BOTTOM)
      dy1=-dy1;
     if(x2<=LEFT||x2>=RIGHT)
      dx2=-dx2;
     if(y2<=TOP||y2>=BOTTOM)
      dy2=-dy2;
     if(++count>LINES)
     {
      setcolor(color);
      color=(color>=MAXCOLOR)?0:++color;
     }
    }
    closegraph();
    }
    设计彩色框的C源程序

    /*
    *
    * Short driver module
    *
    */

    main()
    {
    clrscr();
    box(1,1,23,79);
    box(2,2,21,77);
    box(3,3,19,75);
    box(4,4,17,73);
    box(5,5,15,71);
    box(6,6,13,69);
    box(7,7,11,67);
    box(8,8,9,65);
    box(9,9,7,63);
    box(10,10,5,61);
    box(11,11,3,59);
    box(12,12,1,57);
    poscur(24,1);
    }

    /************************************************************
    * BOX *
    *----------------------------------------------------------*
    * Written by: Jeff Ebert 7/01/87 *
    * Modified by: xxxxxxxxxx *
    * *
    * Please modify me! *
    * Possible Enhancements include but are not limited to: *
    * 1) Variable box character styles [1 line or 2] *
    * 2) Error checking *
    * 3) Color options *
    * *
    * *
    * This function builds a simple double frame for a menu. *
    


    5楼2007-01-18 06:48
    回复
      * The function is passed the parameters for the upper *
      * left corner row, upper left corner column the height *
      * of the frame and the width. *
      * *
      ************************************************************/
      #include 

      #define ULCOR 201
      #define URCOR 187
      #define LLCOR 200
      #define LRCOR 188
      #define VBAR 186
      #define HBAR 205
      #define ESC 27


      box(row, col, hgt, wdth)
      int row, col, hgt, wdth;

      {
      int x, y;

      poscur(row,col);
      putchar(ULCOR);
      for(x = col + 1; x <=(col + wdth -1); x++)
      putchar(HBAR);
      putchar(URCOR);

      for(x = row + 1; x <=(row + hgt - 1); x++){
      poscur(x,col);
      putchar(VBAR);
      poscur(x,col+wdth);
      putchar(VBAR);
      }
      poscur(x,col);
      putchar(LLCOR);
      for(x= col + 1; x <=(col + wdth -1); x++)
      putchar(HBAR);
      putchar(LRCOR);
      }

      /********************************************************
      * POSCUR *
      *------------------------------------------------------*
      * This function positions the cursor at the specified *
      * x,y coordinate. It uses the ANSI standard ESCAPE *
      * sequence to produce the desired effect. Its not the *
      * fastest way to position the cursor, but perhaps the *
      * most portable. *
      * *
      ********************************************************/
      poscur(xcor,ycor)
      int xcor,ycor;

      printf("%c[%d;%dH",ESC,xcor,ycor);
      }


      /********************************************************
      * CLRSCR *
      *------------------------------------------------------*
      * This function positions the cursor at the specified *
      * x,y coordinate. It uses the ANSI standard ESCAPE *
      * sequence to produce the desired effect. Its not the *
      * fastest way to position the cursor, but perhaps the *
      * most portable. *
      * *
      ********************************************************/
      clrscr()

      printf("%c[2J",ESC);
      }

      【程序71】
      题目:编写input()和output()函数输入,输出5个学生的数据记录。
      1.程序分析:
      2.程序源代码:
      #define N 5
      struct student
      { char num[6];
       char name[8];
       int score[4];
      } stu[N];
      input(stu)
      struct student stu[];
      { int i,j;
       for(i=0;i<N;i++)
       { printf("\n please input %d of %d\n",i+1,N);
        printf("num: ");
        scanf("%s",stu[i].num);
        printf("name: ");
        scanf("%s",stu[i].name);
         for(j=0;j<3;j++)
         { printf("score %d.",j+1);
          scanf("%d",&stu[i].score[j]);
         }
        printf("\n");
       }
      }
      print(stu)
      struct student stu[];
      { int i,j;
      printf("\nNo. Name Sco1 Sco2 Sco3\n");
      for(i=0;i<N;i++)
      { printf("%-6s%-10s",stu[i].num,stu[i].name);
       for(j=0;j<3;j++)
        printf("%-8d",stu[i].score[j]);
       printf("\n");
      }
      }
      main()
      {
       input();
       print();
      }
      ==============================================================
      【程序72】
      题目:创建一个链表。
      1.程序分析:           
      2.程序源代码:
      /*creat a list*/
      #include "stdlib.h"
      #include "stdio.h"
      struct list
      { int data;
      struct list *next;
      };
      typedef struct list node;
      typedef node *link;
      void main()
      { link ptr,head;
      int num,i;
      ptr=(link)malloc(sizeof(node));
      ptr=head;
      printf("please input 5 numbers==>\n");
      for(i=0;i<=4;i++)
      {
       scanf("%d",&num);
       ptr->data=num;
      


      6楼2007-01-18 06:48
      回复
         ptr->next=(link)malloc(sizeof(node));
         if(i==4) ptr->next=NULL;
         else ptr=ptr->next;
        }
        ptr=head;
        while(ptr!=NULL)
        { printf("The value is ==>%d\n",ptr->data);
         ptr=ptr->next;
        }
        }
        ==============================================================
        【程序73】
        题目:反向输出一个链表。   
        1.程序分析:
        2.程序源代码:
        /*reverse output a list*/
        #include "stdlib.h"
        #include "stdio.h"
        struct list
        { int data;
         struct list *next;
        };
        typedef struct list node;
        typedef node *link;
        void main()
        { link ptr,head,tail; 
         int num,i;
         tail=(link)malloc(sizeof(node));
         tail->next=NULL;
         ptr=tail;
         printf("\nplease input 5 data==>\n");
         for(i=0;i<=4;i++)
         {
          scanf("%d",&num);
          ptr->data=num;
          head=(link)malloc(sizeof(node));
          head->next=ptr;
          ptr=head;
         }
        ptr=ptr->next;
        while(ptr!=NULL)
        { printf("The value is ==>%d\n",ptr->data);
         ptr=ptr->next;
        }}


        【程序74】
        题目:连接两个链表。
        1.程序分析:
        2.程序源代码:
        #include "stdlib.h"
        #include "stdio.h"
        struct list
        { int data;
        struct list *next;
        };
        typedef struct list node;
        typedef node *link;
        link delete_node(link pointer,link tmp)
        {if (tmp==NULL) /*delete first node*/
         return pointer->next;
        else
        { if(tmp->next->next==NULL)/*delete last node*/
          tmp->next=NULL;
         else /*delete the other node*/
          tmp->next=tmp->next->next;
         return pointer;
        }
        }
        void selection_sort(link pointer,int num)
        { link tmp,btmp;
         int i,min;
         for(i=0;i<num;i++)
         {
         tmp=pointer;
         min=tmp->data;
         btmp=NULL;
         while(tmp->next)
         { if(min>tmp->next->data)
         {min=tmp->next->data;
          btmp=tmp;
         }
         tmp=tmp->next;
         }
        printf("\40: %d\n",min);
        pointer=delete_node(pointer,btmp);
        }
        }
        link create_list(int array[],int num)
        { link tmp1,tmp2,pointer;
        int i;
        pointer=(link)malloc(sizeof(node));
        pointer->data=array[0];
        tmp1=pointer;
        for(i=1;i<num;i++)
        { tmp2=(link)malloc(sizeof(node));
         tmp2->next=NULL;
         tmp2->data=array[i];
         tmp1->next=tmp2;
         tmp1=tmp1->next;
        }
        return pointer;
        }
        link concatenate(link pointer1,link pointer2)
        { link tmp;
        tmp=pointer1;
        while(tmp->next)
         tmp=tmp->next;
        tmp->next=pointer2;
        return pointer1;
        }
        void main(void)
        { int arr1[]={3,12,8,9,11};
         link ptr;
         ptr=create_list(arr1,5);
         selection_sort(ptr,5);
        }
        ==============================================================
        【程序75】
        题目:放松一下,算一道简单的题目。
        1.程序分析:
        2.程序源代码:
        main()
        {
        int i,n;
        for(i=1;i<5;i++)
        { n=0;
         if(i!=1)
         n=n+1;
         if(i==3)
         n=n+1;
         if(i==4)
         n=n+1;
         if(i!=4)
         n=n+1;
         if(n==3)
          printf("zhu hao shi de shi:%c",64+i);
         }
        }
        ==============================================================
        【程序76】
        题目:编写一个函数,输入n为偶数时,调用函数求1/2+1/4+...+1/n,当输入n为奇数时,调用函数
           1/1+1/3+...+1/n(利用指针函数)
        1.程序分析:
        2.程序源代码:
        main()
        #include "stdio.h"
        main()
        {
        float peven(),podd(),dcall();
        float sum;
        int n;
        while (1)
        {
         scanf("%d",&n);
         if(n>1)
          break;
        }
        if(n%2==0)
        {
         printf("Even=");
         sum=dcall(peven,n);
        


        7楼2007-01-18 06:48
        回复
          {
          b.x=20;
          b.c='y';
          }
          ==============================================================
          【程序88】
          题目:读取7个数(1—50)的整数值,每读取一个值,程序打印出该值个数的*。
          1.程序分析:
          2.程序源代码:
          main()
          {int i,a,n=1;
          while(n<=7)
          { do {
             scanf("%d",&a);
             }while(a<1||a>50);
          for(i=1;i<=a;i++)
           printf("*");
          printf("\n");
          n++;}
          getch();
          }
          ==============================================================
          【程序89】
          题目:某个公司采用公用电话传递数据,数据是四位的整数,在传递过程中是加密的,加密规则如下:
             每位数字都加上5,然后用和除以10的余数代替该数字,再将第一位和第四位交换,第二位和第三位交换。
          1.程序分析:
          2.程序源代码:
          main()
          {int a,i,aa[4],t;
          scanf("%d",&a);
          aa[0]=a%10;
          aa[1]=a%100/10;
          aa[2]=a%1000/100;
          aa[3]=a/1000;
          for(i=0;i<=3;i++)
           {aa[i]+=5;
           aa[i]%=10;
           }
          for(i=0;i<=3/2;i++)
           {t=aa[i];
           aa[i]=aa[3-i];
           aa[3-i]=t;
           }
          for(i=3;i>=0;i--)
          printf("%d",aa[i]);
          }


          【程序94】
          题目:时间函数举例4,一个猜数游戏,判断一个人反应快慢。(版主初学时编的)
          1.程序分析:
          2.程序源代码:
          #include "time.h"
          #include "stdlib.h"
          #include "stdio.h"
          main()
          {char c;
          clock_t start,end;
          time_t a,b;
          double var;
          int i,guess;
          srand(time(NULL));
          printf("do you want to play it.('y' or 'n') \n");
          loop:
          while((c=getchar())=='y')
          {
          i=rand()%100;
          printf("\nplease input number you guess:\n");
          start=clock();
          a=time(NULL);
          scanf("%d",&guess);
          while(guess!=i)
          {if(guess>i)
          {printf("please input a little smaller.\n");
          scanf("%d",&guess);}
          else
          {printf("please input a little bigger.\n");
          scanf("%d",&guess);}
          }
          end=clock();
          b=time(NULL);
          printf("\1: It took you %6.3f seconds\n",var=(double)(end-start)/18.2);
          printf("\1: it took you %6.3f seconds\n\n",difftime(b,a));
          if(var<15)
          printf("\1\1 You are very clever! \1\1\n\n");
          else if(var<25)
          printf("\1\1 you are normal! \1\1\n\n");
          else
          printf("\1\1 you are stupid! \1\1\n\n");
          printf("\1\1 Congradulations \1\1\n\n");
          printf("The number you guess is %d",i);
          }
          printf("\ndo you want to try it again?(\"yy\".or.\"n\")\n");
          if((c=getch())=='y')
          goto loop;
          }
          ==============================================================
          【程序95】
          题目:家庭财务管理小程序
          1.程序分析:
          2.程序源代码:
          /*money management system*/
          #include "stdio.h"
          #include "dos.h"
          main()
          {
          FILE *fp;
          struct date d;
          float sum,chm=0.0;
          int len,i,j=0;
          int c;
          char ch[4]="",ch1[16]="",chtime[12]="",chshop[16],chmoney[8];
          pp: clrscr();
          sum=0.0;
          gotoxy(1,1);printf("|---------------------------------------------------------------------------|");
          gotoxy(1,2);printf("| money management system(C1.0) 2000.03 |");
          gotoxy(1,3);printf("|---------------------------------------------------------------------------|");
          gotoxy(1,4);printf("| -- money records -- | -- today cost list -- |");
          gotoxy(1,5);printf("| ------------------------ |-------------------------------------|");
          gotoxy(1,6);printf("| date: -------------- | |");
          gotoxy(1,7);printf("| | | | |");
          gotoxy(1,8);printf("| -------------- | |");
          gotoxy(1,9);printf("| thgs: ------------------ | |");
          


          10楼2007-01-18 06:48
          回复
            gotoxy(1,10);printf("| | | | |");
            gotoxy(1,11);printf("| ------------------ | |");
            gotoxy(1,12);printf("| cost: ---------- | |");
            gotoxy(1,13);printf("| | | | |");
            gotoxy(1,14);printf("| ---------- | |");
            gotoxy(1,15);printf("| | |");
            gotoxy(1,16);printf("| | |");
            gotoxy(1,17);printf("| | |");
            gotoxy(1,18);printf("| | |");
            gotoxy(1,19);printf("| | |");
            gotoxy(1,20);printf("| | |");
            gotoxy(1,21);printf("| | |");
            gotoxy(1,22);printf("| | |");
            gotoxy(1,23);printf("|---------------------------------------------------------------------------|");
            i=0;
            getdate(&d);
            sprintf(chtime,"%4d.%02d.%02d",d.da_year,d.da_mon,d.da_day);
            for(;;)
            {
            gotoxy(3,24);printf(" Tab __browse cost list Esc __quit");
            gotoxy(13,10);printf(" ");
            gotoxy(13,13);printf(" ");
            gotoxy(13,7);printf("%s",chtime);
            j=18;
            ch[0]=getch();
            if(ch[0]==27)
            break;
            strcpy(chshop,"");
            strcpy(chmoney,"");
            if(ch[0]==9)
            {
            mm:i=0;
            fp=fopen("home.dat","r+");
            gotoxy(3,24);printf(" ");
            gotoxy(6,4);printf(" list records ");
            gotoxy(1,5);printf("|-------------------------------------|");
            gotoxy(41,4);printf(" ");
            gotoxy(41,5);printf(" |");
            while(fscanf(fp,"%10s%14s%f\n",chtime,chshop,&chm)!=EOF)
            { if(i==36)
            { getch();
            i=0;}
            if ((i%36)<17)
            { gotoxy(4,6+i);
            printf(" ");
            gotoxy(4,6+i);}
            else
            if((i%36)>16)
            { gotoxy(41,4+i-17);
            printf(" ");
            gotoxy(42,4+i-17);}
            i++;
            sum=sum+chm;
            printf("%10s %-14s %6.1f\n",chtime,chshop,chm);}
            gotoxy(1,23);printf("|---------------------------------------------------------------------------|");
            gotoxy(1,24);printf("| |");
            gotoxy(1,25);printf("|---------------------------------------------------------------------------|");
            gotoxy(10,24);printf("total is %8.1f$",sum);
            fclose(fp);
            gotoxy(49,24);printf("press any key to.....");getch();goto pp;
            }
            else
            {
            while(ch[0]!='\r')
            { if(j<10)
            { strncat(chtime,ch,1);
            j++;}
            if(ch[0]==8)
            {
            len=strlen(chtime)-1;
            if(j>15)
            { len=len+1; j=11;}
            strcpy(ch1,"");
            j=j-2;
            strncat(ch1,chtime,len);
            strcpy(chtime,"");
            strncat(chtime,ch1,len-1);
            gotoxy(13,7);printf(" ");}
            gotoxy(13,7);printf("%s",chtime);ch[0]=getch();
            if(ch[0]==9)
            goto mm;
            if(ch[0]==27)
            exit(1);
            }
            gotoxy(3,24);printf(" ");
            gotoxy(13,10);
            j=0;
            ch[0]=getch();
            while(ch[0]!='\r')
            { if (j<14)
            { strncat(chshop,ch,1);
            j++;}
            if(ch[0]==8)
            { len=strlen(chshop)-1;
            strcpy(ch1,"");
            j=j-2;
            strncat(ch1,chshop,len);
            strcpy(chshop,"");
            strncat(chshop,ch1,len-1);
            gotoxy(13,10);printf(" ");}
            gotoxy(13,10);printf("%s",chshop);ch[0]=getch();}
            gotoxy(13,13);
            j=0;
            ch[0]=getch();
            while(ch[0]!='\r')
            { if (j<6)
            { strncat(chmoney,ch,1);
            j++;}
            if(ch[0]==8)
            { len=strlen(chmoney)-1;
            strcpy(ch1,"");
            j=j-2;
            strncat(ch1,chmoney,len);
            strcpy(chmoney,"");
            strncat(chmoney,ch1,len-1);
            gotoxy(13,13);printf(" ");}
            gotoxy(13,13);printf("%s",chmoney);ch[0]=getch();}
            if((strlen(chshop)==0)||(strlen(chmoney)==0))
            continue;
            if((fp=fopen("home.dat","a+"))!=NULL);
            fprintf(fp,"%10s%14s%6s",chtime,chshop,chmoney);
            fputc('\n',fp);
            fclose(fp);
            i++;
            gotoxy(41,5+i);
            printf("%10s %-14s %-6s",chtime,chshop,chmoney);
            


            11楼2007-01-18 06:48
            回复
              d


              13楼2007-01-18 08:51
              回复
                看不


                IP属地:广东14楼2007-01-20 03:51
                回复
                  。。


                  15楼2007-01-20 08:38
                  回复
                    经典c程序100


                    IP属地:广东16楼2007-01-21 05:35
                    回复
                      ...


                      17楼2007-01-21 08:46
                      回复
                        很难啊


                        18楼2009-11-05 19:34
                        回复
                          程序八的第二个循环处有错误,应该把"j=1"改为"j=i",很明显的错误,应该是打错了


                          19楼2010-10-06 21:09
                          回复