Skip to content

Commit e90c4a3

Browse files
committed
chore: improved consistencies
1 parent efadea5 commit e90c4a3

File tree

9 files changed

+39
-39
lines changed

9 files changed

+39
-39
lines changed

chapter_4/exercise_4_10/calculator.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int main(void)
7777
}
7878
else
7979
{
80-
printf("Error: zero divisor\n");
80+
printf("Error: zero divisor.\n");
8181
}
8282

8383
break;
@@ -91,7 +91,7 @@ int main(void)
9191
}
9292
else
9393
{
94-
printf("Error: zero divisor\n");
94+
printf("Error: zero divisor.\n");
9595
}
9696
break;
9797

@@ -141,7 +141,7 @@ int main(void)
141141
break;
142142

143143
default:
144-
printf("Error: unknown command %s\n", s);
144+
printf("Error: unknown command %s.\n", s);
145145
break;
146146
}
147147
}
@@ -161,7 +161,7 @@ void push(double f)
161161
}
162162
else
163163
{
164-
printf("Error: stack full\n");
164+
printf("Error: stack full.\n");
165165
}
166166
}
167167

@@ -173,7 +173,7 @@ double pop(void)
173173
}
174174
else
175175
{
176-
printf("Error: stack empty\n");
176+
printf("Error: stack empty.\n");
177177
}
178178

179179
return 0.0;
@@ -197,7 +197,7 @@ void view_head(void)
197197
}
198198
else
199199
{
200-
printf("Error: stack empty\n");
200+
printf("Error: stack empty.\n");
201201
}
202202
}
203203

chapter_4/exercise_4_11/getop.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(void)
4747
}
4848
else
4949
{
50-
printf("Error: zero divisor\n");
50+
printf("Error: zero divisor.\n");
5151
}
5252

5353
break;
@@ -61,7 +61,7 @@ int main(void)
6161
}
6262
else
6363
{
64-
printf("Error: zero divisor\n");
64+
printf("Error: zero divisor.\n");
6565
}
6666
break;
6767

@@ -70,7 +70,7 @@ int main(void)
7070
break;
7171

7272
default:
73-
printf("Error: unknown command %s\n", s);
73+
printf("Error: unknown command %s.\n", s);
7474
break;
7575
}
7676
}
@@ -89,7 +89,7 @@ void push(double f)
8989
}
9090
else
9191
{
92-
printf("Error: stack full, can't push %g\n", f);
92+
printf("Error: stack full, can't push %g.\n", f);
9393
}
9494
}
9595

@@ -101,7 +101,7 @@ double pop(void)
101101
}
102102
else
103103
{
104-
printf("Error: stack empty\n");
104+
printf("Error: stack empty.\n");
105105
return 0.0;
106106
}
107107
}

chapter_4/exercise_4_3/calculator.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(void)
4747
}
4848
else
4949
{
50-
printf("Error: zero divisor\n");
50+
printf("Error: zero divisor.\n");
5151
}
5252

5353
break;
@@ -61,7 +61,7 @@ int main(void)
6161
}
6262
else
6363
{
64-
printf("Error: zero divisor\n");
64+
printf("Error: zero divisor.\n");
6565
}
6666
break;
6767

@@ -70,7 +70,7 @@ int main(void)
7070
break;
7171

7272
default:
73-
printf("Error: unknown command %s\n", s);
73+
printf("Error: unknown command %s.\n", s);
7474
break;
7575
}
7676
}
@@ -89,7 +89,7 @@ void push(double f)
8989
}
9090
else
9191
{
92-
printf("Error: stack full, can't push %g\n", f);
92+
printf("Error: stack full, can't push %g.\n", f);
9393
}
9494
}
9595

@@ -101,7 +101,7 @@ double pop(void)
101101
}
102102
else
103103
{
104-
printf("Error: stack empty\n");
104+
printf("Error: stack empty.\n");
105105
return 0.0;
106106
}
107107
}

chapter_4/exercise_4_4/stack.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int main(void)
5252
}
5353
else
5454
{
55-
printf("Error: zero divisor\n");
55+
printf("Error: zero divisor.\n");
5656
}
5757

5858
break;
@@ -66,7 +66,7 @@ int main(void)
6666
}
6767
else
6868
{
69-
printf("Error: zero divisor\n");
69+
printf("Error: zero divisor.\n");
7070
}
7171
break;
7272

@@ -91,7 +91,7 @@ int main(void)
9191
break;
9292

9393
default:
94-
printf("Error: unknown command %s\n", s);
94+
printf("Error: unknown command %s.\n", s);
9595
break;
9696
}
9797
}
@@ -110,7 +110,7 @@ void push(double f)
110110
}
111111
else
112112
{
113-
printf("Error: stack full\n");
113+
printf("Error: stack full.\n");
114114
}
115115
}
116116

@@ -122,7 +122,7 @@ double pop(void)
122122
}
123123
else
124124
{
125-
printf("Error: stack empty\n");
125+
printf("Error: stack empty.\n");
126126
}
127127

128128
return 0.0;
@@ -136,7 +136,7 @@ void view_head(void)
136136
}
137137
else
138138
{
139-
printf("Error: stack empty\n");
139+
printf("Error: stack empty.\n");
140140
}
141141
}
142142

chapter_4/exercise_4_5/math.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int main(void)
5454
}
5555
else
5656
{
57-
printf("Error: zero divisor\n");
57+
printf("Error: zero divisor.\n");
5858
}
5959

6060
break;
@@ -68,7 +68,7 @@ int main(void)
6868
}
6969
else
7070
{
71-
printf("Error: zero divisor\n");
71+
printf("Error: zero divisor.\n");
7272
}
7373
break;
7474

@@ -106,7 +106,7 @@ int main(void)
106106
break;
107107

108108
default:
109-
printf("Error: unknown command %s\n", s);
109+
printf("Error: unknown command %s.\n", s);
110110
break;
111111
}
112112
}
@@ -125,7 +125,7 @@ void push(double f)
125125
}
126126
else
127127
{
128-
printf("Error: stack full\n");
128+
printf("Error: stack full.\n");
129129
}
130130
}
131131

@@ -137,7 +137,7 @@ double pop(void)
137137
}
138138
else
139139
{
140-
printf("Error: stack empty\n");
140+
printf("Error: stack empty.\n");
141141
}
142142

143143
return 0.0;
@@ -151,7 +151,7 @@ void view_head(void)
151151
}
152152
else
153153
{
154-
printf("Error: stack empty\n");
154+
printf("Error: stack empty.\n");
155155
}
156156
}
157157

chapter_4/exercise_4_6/variables.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main(void)
6969
}
7070
else
7171
{
72-
printf("Error: zero divisor\n");
72+
printf("Error: zero divisor.\n");
7373
}
7474

7575
break;
@@ -83,7 +83,7 @@ int main(void)
8383
}
8484
else
8585
{
86-
printf("Error: zero divisor\n");
86+
printf("Error: zero divisor.\n");
8787
}
8888
break;
8989

@@ -133,7 +133,7 @@ int main(void)
133133
break;
134134

135135
default:
136-
printf("Error: unknown command %s\n", s);
136+
printf("Error: unknown command %s.\n", s);
137137
break;
138138
}
139139
}
@@ -152,7 +152,7 @@ void push(double f)
152152
}
153153
else
154154
{
155-
printf("Error: stack full\n");
155+
printf("Error: stack full.\n");
156156
}
157157
}
158158

@@ -164,7 +164,7 @@ double pop(void)
164164
}
165165
else
166166
{
167-
printf("Error: stack empty\n");
167+
printf("Error: stack empty.\n");
168168
}
169169

170170
return 0.0;
@@ -188,7 +188,7 @@ void view_head(void)
188188
}
189189
else
190190
{
191-
printf("Error: stack empty\n");
191+
printf("Error: stack empty.\n");
192192
}
193193
}
194194

chapter_5/exercise_5_10/expr.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ int main(int argc, char *argv[])
7777
switch (Error)
7878
{
7979
case 1:
80-
printf("Error: arguments should be numbers or one of the following mathematical operations: '+', '-', '*', '/'\n");
80+
printf("Error: arguments should be numbers or one of the following mathematical operations: '+', '-', '*', '/'.\n");
8181
break;
8282

8383
case 2:
8484
printf("Error: too many or too few arguments.\n");
8585
break;
8686

8787
case 3:
88-
printf("Error: invalid operation. use one of the following mathematical operations: '+', '-', '*', '/'\n");
88+
printf("Error: invalid operation. use one of the following mathematical operations: '+', '-', '*', '/'.\n");
8989
break;
9090

9191
case 4:

chapter_5/exercise_5_7/readlines.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int main()
3030
}
3131
else
3232
{
33-
printf("Error: input too big to sort\n");
33+
printf("Error: input too big to sort.\n");
3434
return 1;
3535
}
3636
}

chapter_7/exercise_7_5/calculator.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void push(double f)
8888
}
8989
else
9090
{
91-
printf("Error: stack full, can't push %g\n", f);
91+
printf("Error: stack full, can't push %g.\n", f);
9292
}
9393
}
9494

@@ -100,7 +100,7 @@ double pop(void)
100100
}
101101
else
102102
{
103-
printf("Error: stack empty\n");
103+
printf("Error: stack empty.\n");
104104
return 0.0;
105105
}
106106
}

0 commit comments

Comments
 (0)