Mais um blog inútil.

Junho 14, 2010

Arvorezinha – OCTAVE

Filed under: Arvorezinha — jsaramago @ 23:04

Boas,
Noutro dia, estava eu muito bem a trabalhar para middleware na faculdade, até que veio ter comigo uma gaja das quimicas a perguntar se eu sabia como chamar uma função em octave. Tive que dizer que não sabia, mas pensei, ainda não existe uma arvorezinha em octave. Aqui vai ela.

C:\Octave\3.2.4_gcc-4.4.0\bin>cat arvorezinha-octave.txt
for i=1:5
	for j=1:i
		printf("*")
	endfor
	printf("\n")
endfor
C:\Octave\3.2.4_gcc-4.4.0\bin>octave.exe arvorezinha-octave.txt
GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to  (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

For information about changes from previous versions, type `news'.

*
**
***
****
*****

Comentar

widgeon
widgeon
widgeon
widgeon