ErrorDeSintaxis

Pequeños fragmentos de código fuente en distintos lenguajes de programación, agrupados por categorías.

Puedes buscar entre los fuentes existentes, o aportar los tuyos.

Locomotive Basic: Figuras geométricas básicas

Como dibujar cuadrados, rectangulos, triangulo, circulos

Lenguaje: Locomotive Basic

Categoría: Gráficos

Figuras geométricas básicas
 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Fuente procedente de ErrorDeSintaxis.es 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Como dibujar cuadrados, rectangulos, triangulo, 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
'  circulos 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Lenguaje: Locomotive Basic 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Nivel: Básico 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Disponible desde 28/07/2011 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Aportado por Nacho 

Notice: Undefined index: LocoBasic in /home/u801964362/domains/errordesintaxis.es/public_html/inc_libreria.php on line 43

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
' Autor original: Nacho Cabanes 

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112

Notice: Undefined offset: 2 in /home/u801964362/domains/errordesintaxis.es/public_html/csintaxis/geshi.php on line 3112
10 ' Figuras geomtricas basicas
20 MODE 1
30 ' Prefijamos colores: blanco sobre negro
40 INK 0,0
50 INK 1,26
60 PAPER 0
70 PEN 1
80 ' Linea
90 x1=10:y1=0:x2=629:y2=399
100 PLOT x1,y1
110 DRAW x2,y2
120 ' Cuadrado
130 x1=20:y1=40:lado=50
140 PLOT x1,y1
150 DRAWR lado,0
160 DRAWR 0,lado
170 DRAWR -lado,0
180 DRAWR 0,-lado
190 ' Rectangulo
200 x1=220:y1=140:ancho=200:alto=100
210 PLOT x1,y1
220 DRAWR ancho,0
230 DRAWR 0,alto
240 DRAWR -ancho,0
250 DRAWR 0,-alto
260 ' Triangulo
270 x1=410:y1=10:x2=450:y2=70:x3=480:y2=20
280 PLOT x1,y1
290 DRAW x2,y2
300 DRAW x3,y3
310 DRAW x1,y1
320 ' Rectangulo relleno
330 x1=300:y1=170:ancho=300:alto=120
340 FOR fila = y1 TO y1+alto STEP 2
350   PLOT x1,fila
360   DRAWR ancho,0
370 NEXT
380 ' Circulo
390 DEG
400 centroX = 160: centroY = 290: radio = 50
410 PLOT centroX + radio, centroY
420 FOR angulo = 1 TO 370 STEP 10
430   DRAW centroX + radio*COS(angulo), centroY + radio*SIN(angulo)
440 NEXT angulo