init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// This file will not be tested, you can modify it.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fork.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (!strcmp(argv[0], "./is_prime"))
|
||||
{
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
is_prime(atoi(argv[i]));
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[0], "./salute"))
|
||||
{
|
||||
return salute(argc, argv);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("No such thing as %s\n", argv[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user