#include <stdio.h>
main()
{
int a = 2;
int b = 3;
for(;a<=12;a+=2)
{
for(;b<=9;b+=2)
{
printf("%d * %d = %d\n",a,b,a*b);
}
}
}
conf@home:~/$ ./test
2 * 3 = 6
2 * 5 = 10
2 * 7 = 14
2 * 9 = 18
conf@home:~/$
conf@home:~/$ uname -api
Linux home 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
conf@home:~/$
conf@home:~/$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
conf@home:~/$
почему не отрабатывает внешний цикл ? в чем фишка или это баг такой ?