series

how to do this series

1+2+4+7+11+....+56
find the pattern -> create loop.
make this code...i cant
for(int i=1, dif =1; i<=56; i+= dif, dif++)

EDIT: please don't create duplicate thread.
http://www.cplusplus.com/forum/beginner/159272/
Last edited on
Topic archived. No new replies allowed.