Improve yes

This commit is contained in:
call-cc 2020-06-02 20:43:33 -04:00
parent 0670f46ef8
commit e27abc9c3b
1 changed files with 4 additions and 12 deletions

View File

@ -1,19 +1,11 @@
#include <stdio.h> #include <stdio.h>
#include <string.h>
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
char a = 'y'; if(argc > 1)
while(1) puts(argv[1]);
if(argv[1] != NULL) else
{ while(1) puts("y");
strcpy(&a,argv[1]);
}
while(1)
{
putchar(a);
putchar('\n');
}
return 0; return 0;
} }