removing "can_print_it"
This commit is contained in:
parent
f380dab295
commit
20da5c59fd
8
ex14.c
8
ex14.c
@ -1,7 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
int can_print_it(char ch);
|
||||
void print_letters(char arg[]);
|
||||
|
||||
void print_arguments(int argc, char *argv[])
|
||||
@ -20,7 +19,7 @@ void print_letters(char arg[])
|
||||
for (i = 0; arg[i] != '\0'; i++) {
|
||||
char ch = arg[i];
|
||||
|
||||
if(can_print_it(ch)) {
|
||||
if(isalpha(ch) || isblank(ch)) {
|
||||
printf("'%c' == %d ", ch, ch);
|
||||
}
|
||||
}
|
||||
@ -28,11 +27,6 @@ void print_letters(char arg[])
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int can_print_it(char ch)
|
||||
{
|
||||
return isalpha(ch) || isblank(ch);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
print_arguments(argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user