Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 3 of file day2doy.c.
5 {
6
7 int doy;
8
9
10 if (argc < 4)
11 ERRMSG(
"Give parameters: <year> <mon> <day>");
12
13
14 const int year = atoi(argv[1]);
15 const int mon = atoi(argv[2]);
16 const int day = atoi(argv[3]);
17
18
20 printf("%d %d\n", year, doy);
21
22 return EXIT_SUCCESS;
23}
#define ERRMSG(...)
Print error message and quit program.
void day2doy(const int year, const int mon, const int day, int *doy)
Get day of year from date.