2) $comp_cnt++; if ($arithm_cnt == 1000 || $arithm_cnt == 10000 || $arithm_cnt == 100000 || $arithm_cnt == 1000000) { echo PHP_EOL; echo 'The '.str_pad($arithm_cnt, 7, ' ', STR_PAD_LEFT). 'th arithmetic number is '. str_pad($n, 8, ' ', STR_PAD_LEFT) . ' up to which ', str_pad($comp_cnt, 6, ' ', STR_PAD_LEFT). ' are composite.'; } } $n++; } echo PHP_EOL; ?>