1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
$ ./a.out
Enter n: 2
n=2, sum=0, a=1
n=2, sum=0, a=2
n=2, sum=1, a=3
n=2, sum=1, a=4
n=2, sum=2, a=5
n=2, sum=2, a=6
n=2, sum=4, a=7
n=2, sum=4, a=8
n=2, sum=6, a=9
n=2, sum=6, a=10
n=2, sum=8, a=11
n=2, sum=8, a=12
n=2, sum=10, a=13
n=2, sum=10, a=14
n=2, sum=12, a=15
n=2, sum=12, a=16
n=2, sum=14, a=17
n=2, sum=14, a=18
// etc etc until crash
|