author | Markus Bröker<broeker.markus@googlemail.com> |
Fri, 20 Oct 2017 06:46:47 +0200 | |
changeset 170 | 5a11538e7bc8 |
parent 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 |
/** |
77 | 2 |
* folge.c |
9
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 |
} |