Use float as for loop control variable
#include <stdio.h> int main(void) { double f; for(f = 1.0; f < 1.0e+10; f = f*10) printf("%g ", f); return 0; }