#include <stdio.h>
/*
	Goto example
*/
#define true 1
#define false 0
#define bool int

int main(void) {
	
	for( int i = 0; i < 10; ++i ){
		for( int j = 0; j < 10; ++j ){
			if( j == 3 ) goto exit_two_loops;
			printf("%d + %d = %d\n", i, j, i+j ); /* just fo example */
		}
	}
	exit_two_loops:

	{ /* of course we do not need this to be visible outside */
	bool we_should_exit_i = false;
	for( int i = 0; i < 10; ++i ){
		for( int j = 0; j < 10; ++j ){
			if( j == 3 ) {
				we_should_exit_i = true;
				/* note that in real program it will not be that simple */
				break;
			}
			printf("%d + %d = %d\n", i, j, i+j ); /* just for example */
		}
		if( we_should_exit_i ) break;
	}
	}
	
	puts( "Why do we need 'goto'? We don't. Goto is bad, do not use it." );
	return 0;
}
