30 lines
502 B
C
30 lines
502 B
C
// 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;
|
|
}
|