source:
experiments/LL_API_test_1/silnia.c
@
16
Revision 16, 275 bytes checked in by mmatloka, 14 years ago (diff) |
---|
Line | |
---|---|
1 | #include <stdio.h> |
2 | #include <stdlib.h> |
3 | |
4 | int main(int argc, char **argv) |
5 | { |
6 | int i = 0,w=1; |
7 | if(argc<2) |
8 | { |
9 | fprintf(stderr,"N?\n"); |
10 | return 1; |
11 | } |
12 | |
13 | for(i=2;i<=atoi(argv[1]);i++) |
14 | w*=i; |
15 | |
16 | fprintf(stdout,"Silnia z %s to %d\n",argv[1],w); |
17 | |
18 | return 0; |
19 | } |
Note: See TracBrowser
for help on using the repository browser.