[ create a new paste ] login | about

Link: http://codepad.org/X86QG9eT    [ raw code | output | fork ]

C, pasted on Jan 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <math.h>
 
int main (void)
{
        long max, val = 0;
        size_t cnt;
        
        cnt = 3;
 
        for ( max = (long) pow (2., cnt) ; val != max ; ++val )
                printf ("%ld ", val);
                
        printf ("\n"); 
        return 0;
}


Output:
1
0 1 2 3 4 5 6 7 


Create a new paste based on this one


Comments: