Calendar: Difference between revisions
Content added Content deleted
(→{{header|Ruby}}: Adjust output for different widths. New problem with Curses.) |
|||
Line 164: | Line 164: | ||
30 |
30 |
||
</pre> |
</pre> |
||
=={{header|C}}== |
|||
Code reuse:<lang C>#include <stdio.h> |
|||
#include <stdlib.h> |
|||
#include <unistd.h> |
|||
int main(int c, char **v) |
|||
{ |
|||
char *s = (c > 1 && atoi(v[1]) > 0) ? v[1] : "1969"; |
|||
printf("\t\t\t [insert Snoopy here]\n"); |
|||
return execlp("cal", "-h", s, (void*)0); |
|||
}</lang> |
|||
=={{header|D}}== |
=={{header|D}}== |