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 <string.h>
int
main(int argc, char *argv[])
{
char a = 'y';
if(argv[1] != NULL)
{
strcpy(&a,argv[1]);
}
while(1)
{
putchar(a);
putchar('\n');
}
if(argc > 1)
while(1) puts(argv[1]);
else
while(1) puts("y");
return 0;
}