B
Bill Cunningham
I know I'm not seeing something here I should be. Where am I screwing
up?
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int sum(int x, int y)
{
return x + y;
}
int dice(int i)
{
srand(time(NULL));
printf("%i\n", rand() % i);
return 0;
}
int main(int argc, char *argv[])
{
if (argc == 1 || argv > 4) {
fputs("dice gen usage error\n", stderr);
exit(EXIT_FAILURE);
}
di.c: In function `main':
di.c:18: warning: comparison between pointer and integer
di.c:21: error: syntax error at end of input
Here's the compiler errors.
Bill
up?
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int sum(int x, int y)
{
return x + y;
}
int dice(int i)
{
srand(time(NULL));
printf("%i\n", rand() % i);
return 0;
}
int main(int argc, char *argv[])
{
if (argc == 1 || argv > 4) {
fputs("dice gen usage error\n", stderr);
exit(EXIT_FAILURE);
}
di.c: In function `main':
di.c:18: warning: comparison between pointer and integer
di.c:21: error: syntax error at end of input
Here's the compiler errors.
Bill