Skip to content

Commit da9adf0

Browse files
committed
[repo] remove tail spaces
1 parent 3b1415d commit da9adf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2729
-2730
lines changed

016/16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ for(i=0;i<6;i++)
7070
printf(" |\n|");
7171
}
7272
/*scanf("%*c");/*键入回车输出下一个月的日历*/
73-
73+
7474
}
7575
puts("=================================================================|");
7676
puts("\n Press any key to quit...");

019/19.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ main()
2525
printf("\n Press any key to quit...\n");
2626
getch();
2727
}
28-

028/28.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#define ERR 5
22
#define OK 6
33
#include <stdio.h>
4-
4+
55
int status;
66
double result,sig,scale;
77
int sign(int c)/*处理数的符号函数*/
@@ -29,7 +29,7 @@ int statbl[ ][4]={{ 1,2,3,ERR},/*0*/
2929
/*转换函数表*/
3030
int(*funtbl[ ][4])( )={{sign,integer,NULL,NULL},
3131
{NULL,integer,NULL,NULL},
32-
{NULL,integer,NULL,NULL},
32+
{NULL,integer,NULL,NULL},
3333
{NULL,decimal,NULL,NULL},
3434
{NULL,decimal,NULL,NULL}};
3535

@@ -71,6 +71,6 @@ main()
7171
printf("\nPlease input real numbers (use nonreal char to end input):\n");
7272
while(readreal(&x)==1)
7373
printf("The real number you input is: %f\n",x);
74-
printf("\nYou have inputted nonreal char.\n Press any key to quit...\n");
74+
printf("\nYou have inputted nonreal char.\n Press any key to quit...\n");
7575
getch();
7676
}

036/36.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ main()
138138
print_relate(pSon);
139139
print_relate(pDaughter);
140140
print_relate(pCousin);
141-
141+
142142

143143
if(!brothersinlaw(pDaughter,pCousin))
144144
printf("%s and %s are not brothers (sisters) in law.\n",pDaughter->name,pCousin->name);

039/39.C

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,5 @@ void edit() /* 编辑命令 */
158158
fclose(fp);
159159
last=i;
160160
}
161-
162-
163-
161+
162+

040/40.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ main(int argc, char **argv )
3434
{
3535
switch(*s)
3636
{
37-
case 'l':
37+
case 'l':
3838
lflg=1;
3939
break;
4040
case 'w':

041/41.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ main()
300300
break;
301301
case 'n': /* 按学生的姓名寻找记录 */
302302
case 'N':
303-
printf("Please input the student's name you want to search: ");
303+
printf("Please input the student's name you want to search: ");
304304
scanf("%s",buf);
305305
retrievebyn(stuf,buf);
306306
break;
307307
case 'c': /* 按学生的学号寻找记录 */
308308
case 'C':
309-
printf("Please input the student's code you want to search: ");
309+
printf("Please input the student's code you want to search: ");
310310
scanf("%s",buf);
311311
retrievebyc(stuf,buf);
312312
break;

044/44.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ void main()
5353
printf("%4d",R[i]);
5454
puts("\n Press any key to quit...");
5555
getch();
56-
56+
5757
}

045/45.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ void main()
4949
printf("%4d",R[i]);
5050
puts("\n Press any key to quit...");
5151
getch();
52-
52+
5353
}

046/46.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ void main()
4040
printf("%4d",R[i]);
4141
puts("\n Press any key to quit...");
4242
getch();
43-
43+
4444
}

047/47.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ void main()
5959
printf("%4d",R[i]);
6060
puts("\n Press any key to quit...");
6161
getch();
62-
62+
6363
}

048/48.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ void main()
6060
printf("%4d",R[i]);
6161
puts("\n Press any key to quit...");
6262
getch();
63-
63+
6464
}

052/52.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ for(i=m;i>=k;i--)
1616
if(k>1)
1717
comb(i-1,k-1);
1818
else
19-
{ wei=0; /* 预值0 */
19+
{ wei=0; /* 预值0 */
2020
val=0;
2121
for(j=a[0];j>0;j--) /* 每一种组合求它们的重量和价值 */
2222
{ wei=wei+Bag[a[j]].weight;

053/53.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void main()
5050
Initlist(SEQA);
5151

5252
for (i=0;i<ListSize;i++)
53-
{
53+
{
5454
InsertList (SEQA,i,i);
5555
printf("%d\n",SEQA->data[i]);
5656
}

055/55.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ int main(){
128128
for(i =0; i<list.length; i++){
129129
printf("%d\n",list.elem[i]);
130130
} printf("%d\n", list.length);
131-
131+
132132
return 1;
133133
}

056/56.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ main()
2727
q=p; /*q自己移到当前最后一个元素,以备继续链接所用*/
2828
scanf("%c",&ch);
2929
getchar();
30-
}
30+
}
3131
/*以上完成了单链表的创建*/
3232
q=l->next;
3333
p=q->next;
@@ -45,7 +45,7 @@ main()
4545
}
4646
r->next=q;
4747
l->next=r; //头结点指向最后一个结点
48-
48+
4949
q=l; /*输入整个链表前,先将q移到链表头,l一般不动*/
5050
while(q->next!=NULL) /*若q所指向的元素后面还有其它元素,则将该元素的数据输出*/
5151
{

057/57.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct pro //表示项目的结构体
1616
struct achievement ach[5];
1717
int number;};
1818

19-
struct Node
19+
struct Node
2020
{struct pro date;
2121
struct Node *next;};
2222

@@ -75,9 +75,9 @@ void main()
7575
{
7676
t=1;
7777
while(t<=p->date.tag)
78-
{
78+
{
7979
if(p->date.ach[t-1].schoolnumber==j)
80-
{
80+
{
8181
printf("获奖项目:%d ",p->date.number);
8282
printf("名次:%d \n",p->date.ach[t-1].result);
8383
printf("获奖人姓名:%s ",p->date.ach[t-1].name);
@@ -86,7 +86,7 @@ void main()
8686
x[i]=x[i]+p->date.ach[t-1].mark;
8787
else
8888
y[i]=y[i]+p->date.ach[t-1].mark;
89-
}
89+
}
9090
t++;
9191
}
9292
p=p->next;

059/59.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ typedef struct LNode{ //定义链表结构
1212
int PassW[N]={3,1,7,2,4,8,4};
1313
void Joseph(LinkList p,int m,int x); //声明函数
1414
int main()
15-
{
15+
{
1616
int i,m;
1717
LinkList Lhead,p,q; //定义三个指向链表结构的指针
1818
Lhead=(LinkList)malloc(sizeof(LNode)); //初始化头节点
@@ -41,14 +41,14 @@ void Joseph(LinkList p,int m,int x){
4141
q=p;
4242
m%=x; //m对x求余,从而求出链表中的第几个单元是所求节点
4343
if(m==0)m=x; //若m刚好可以整除x,则令m=x,因为如果m=0,则不进行下一个
44-
//for循环,那样就无法使q指向要删除节点,p指向他的的前一节点,那样则无法进行删除操作
44+
//for循环,那样就无法使q指向要删除节点,p指向他的的前一节点,那样则无法进行删除操作
4545
for(i=1;i<=m;i++){
4646
p=q;
4747
q=p->next; //使q指向要删除的节点,p指向q的前一个节点
4848
}
4949
p->next=q->next; //从循环链表中删除q指向的节点
5050
i=q->password;
51-
printf("%d ",q->order);
51+
printf("%d ",q->order);
5252
free(q); //释放q指向的空间
5353
Joseph(p,i,x-1);
5454
}

060/60.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct Family *get_person(void); /* Prototype for input function */
77
char related(struct Family *pmember1, struct Family *pmember2);
88
char set_ancestry(struct Family *pmember1, struct Family *pmember2);
99

10-
struct Date
10+
struct Date
1111
{
1212
int day;
1313
int month;
@@ -31,55 +31,55 @@ void main()
3131
struct Family *first = NULL; /* Pointer to first person */
3232
struct Family *current = NULL; /* Pointer to current person */
3333
struct Family *last = NULL; /* Pointer to previous person */
34-
34+
3535
char more = '\0'; /* Test value for ending input */
36-
36+
3737
for( ; ; )
3838
{
39-
printf("\nDo you want to enter details of a%s person (Y or N)? ",
39+
printf("\nDo you want to enter details of a%s person (Y or N)? ",
4040
first != NULL?"nother " : "" );
4141
scanf(" %c", &more);
42-
if(tolower(more) == 'n')
42+
if(tolower(more) == 'n')
4343
break;
44-
44+
4545
current = get_person();
46-
46+
4747
if(first == NULL)
4848
{
4949
first = current; /* Set pointer to first Family */
5050
last = current; /* Remember for next iteration */
5151
}
5252
else
5353
{
54-
last->next = current; /* Set next address for previous Family */
54+
last->next = current; /* Set next address for previous Family */
5555
current->previous = last; /* Set previous address for current */
56-
last = current; /* Remember for next iteration */
56+
last = current; /* Remember for next iteration */
5757
}
5858
}
59-
59+
6060
current = first;
61-
61+
6262
while(current->next != NULL) /* Check for relation for each person in */
6363
{ /* the list up to second to last */
6464
int parents = 0; /* Declare parent count local to this block */
6565
last = current->next; /* Get the pointer to the next */
66-
66+
6767
while(last != NULL) /* This loop tests current person */
6868
{ /* against all the remainder in the list */
6969
if(related(current, last)) /* Found a parent ? */
7070
if(++parents == 2) /* Yes, update count and check it */
7171
break; /* Exit inner loop if both parents found */
72-
72+
7373
last = last->next; /* Get the address of the next */
74-
}
74+
}
7575
current = current->next; /* Next in the list to check */
7676
}
77-
77+
7878
/* Now tell them what we know */
79-
79+
8080
/* Output Family data in correct order */
8181
current = first;
82-
82+
8383
while (current != NULL) /* Output Family data in correct order */
8484
{
8585
printf("\n%s was born %d/%d/%d, and has %s and %s as parents.",
@@ -88,18 +88,18 @@ void main()
8888
if(current->p_to_pa != NULL )
8989
printf("\n\t%s's birth date is %d/%d/%d ",
9090
current->father, current->p_to_pa->dob.day,
91-
current->p_to_pa->dob.month,
91+
current->p_to_pa->dob.month,
9292
current->p_to_pa->dob.year);
9393
if(current->p_to_ma != NULL)
9494
printf("and %s's birth date is %d/%d/%d.\n ",
9595
current->mother, current->p_to_ma->dob.day,
96-
current->p_to_ma->dob.month,
96+
current->p_to_ma->dob.month,
9797
current->p_to_ma->dob.year);
98-
98+
9999
current = current->next; /* current points to next in list */
100100
}
101-
102-
/* Now free the memory */
101+
102+
/* Now free the memory */
103103
current = first;
104104
while(current->next != NULL)
105105
{
@@ -113,7 +113,7 @@ void main()
113113
struct Family *get_person(void)
114114
{
115115
struct Family *temp; /* Define temporary structure pointer */
116-
116+
117117
/* Allocate memory for a structure */
118118
temp = (struct Family*) malloc(sizeof(struct Family));
119119
printf("\nEnter the name of the person: ");

064/64.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ main()
6060
x2=j;
6161
}
6262
}
63-
63+
6464
huff_node[x1].parent=n+i; /*将找出的两棵子树合并为一棵子树*/
6565
huff_node[x2].parent=n+i;
6666
huff_node[x1].flag=1;
@@ -79,7 +79,7 @@ main()
7979
while(p!=0)
8080
{
8181
if(huff_node[p].lchild==c)
82-
82+
8383
cd.bits[cd.start]=0;
8484
else
8585
cd.bits[cd.start]=1;
@@ -93,13 +93,13 @@ main()
9393
huff_code[i].start=cd.start;
9494
}
9595
/*输出字符的哈夫曼编码*/
96-
puts("The Hafman code are:");
96+
puts("The Hafman code are:");
9797
for(i=0;i<n;i++)
9898
{
9999
for(j=huff_code[i].start;j<=n;j++)
100100
printf("%10d",huff_code[i].bits[j]);
101-
printf("\n");
102-
101+
printf("\n");
102+
103103
}
104104
puts("Press any key to quit...");
105105
getch();

065/65.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void creategraph(int node[20][2],int num)/*num指的是图的边数*/
2828
{
2929
from = node[i][0]; /* 边线的起点 */
3030
to = node[i][1]; /* 边线的终点 */
31-
31+
3232
/* 建立新顶点 */
3333
newnode = ( graph ) malloc(sizeof(struct node));
3434
newnode->vertex = to; /* 建立顶点内容 */

0 commit comments

Comments
 (0)