author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Thu, 16 Apr 2009 12:50:28 +0200 | |
changeset 66 | 2b4f786d9073 |
parent 9 | c3fecc82ade6 |
child 77 | 49e0babccb23 |
permissions | -rw-r--r-- |
9
c3fecc82ade6
standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
1 |
/** |
c3fecc82ade6
standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
2 |
* test/demos/folge.c |
c3fecc82ade6
standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
3 |
* Copyright (C) 2008 Markus Broeker |
0 | 4 |
*/ |
5 |
||
6 |
#include <stdio.h> |
|
7 |
#include <stdlib.h> |
|
8 |
#include <math.h> |
|
9 |
||
10 |
int main (int argc, char **argv) |
|
11 |
{ |
|
12 |
int N; |
|
13 |
||
14 |
if (argc != 2) { |
|
15 |
printf ("Usage: %s <value>\n", argv[0]); |
|
16 |
return EXIT_FAILURE; |
|
17 |
} |
|
18 |
||
19 |
for (N = 1; N <= atoi (argv[1]) + 1; N++) |
|
20 |
printf ("[2^%d]: %.1f\n", N - 1, pow (2, N - 1)); |
|
21 |
||
22 |
return EXIT_SUCCESS; |
|
23 |
} |