All pastes #734343 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-12 16:49 UTC
rendered paste body
#include <iostream>
#include <string>

int main()
{
	int i = 0;
	while( i < 10 )
	{
		int j = 9 * 9 * 9 / 2 + 19;
		std::cout<< "teste while\n";
		i++;
	}
	return 0;
}

root[~]# g++ broma.cpp -o teste
root[~]# time ./teste 
teste while
teste while
teste while
teste while
teste while
teste while
teste while
teste while
teste while
teste while

real    0m0.003s
user    0m0.002s
sys     0m0.001s
------------------------------------------------------
#include <iostream>
#include <string>

int main()
{
	int i;
	for( i = 0; i< 10; i++ )
	{
		int j = 9 * 9 * 9 / 2 + 19;
		std::cout<< "teste for\n";
	}
	return 0;
}

root[~]# time ./teste 
teste for
teste for
teste for
teste for
teste for
teste for
teste for
teste for
teste for
teste for

real    0m0.003s
user    0m0.002s
sys     0m0.002s


------------------------------------------
#include <iostream>
#include <string>

int recur( int x )
{
	if( x == 10 )
		return 0;
	else
	{
		int j = 9 * 9 * 9 / 2 + 19;
		std::cout<< "teste recur\n";
		x++;
		recur( x );
	}
}

int main()
{
	int i = 0;
	recur( i );
	return 0;
}

root[~]# time ./teste 
teste recur
teste recur
teste recur
teste recur
teste recur
teste recur
teste recur
teste recur
teste recur
teste recur

real    0m0.002s
user    0m0.002s
sys     0m0.000s