pa-03
This commit is contained in:
18
pa-03/a4/test.c
Normal file
18
pa-03/a4/test.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void ascii(int s) {
|
||||
if (s < 1) s = 1;
|
||||
|
||||
for (char c = 32; c <= 126;) {
|
||||
for (int i = 0; i < s && c <= 126; i++) {
|
||||
printf("%3d %c ", c, c);
|
||||
c++;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
ascii(5);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user