20.04.2015 Views

reglas generales para la conversion de pseudocodigo a lenguaje c

reglas generales para la conversion de pseudocodigo a lenguaje c

reglas generales para la conversion de pseudocodigo a lenguaje c

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REGLAS GENERALES PARA LA CONVERSION<br />

DE PSEUDOCODIGO A LENGUAJE C<br />

Tab<strong>la</strong> <strong>de</strong> Correspon<strong>de</strong>ncias :<br />

PSEUDOCODIGO<br />

La primera linea <strong>de</strong> todo programa<br />

PROGRAMA ....<br />

INICIO<br />

LENGUAJE C<br />

#inclu<strong>de</strong> <br />

No tiene correspon<strong>de</strong>ncia<br />

void main(void){<br />

FIN }<br />

entero a,b<br />

int a,b;<br />

a = b a = b;<br />

i = i + 1 i = i + 1;<br />

o bien<br />

i++;<br />

SI condicion<br />

* * *<br />

FINSI<br />

SI condicion<br />

* * *<br />

SINO<br />

* * *<br />

FINSI<br />

if (condicion){<br />

* * *<br />

}<br />

if (condicion){<br />

* * *<br />

}<br />

else{<br />

* * *<br />

}<br />

MIENTRAS condicion<br />

* * *<br />

FINM<br />

HACER<br />

* * *<br />

MIENTRAS condicion<br />

while (condicion){<br />

* * *<br />

}<br />

do{<br />

* * *<br />

} while (condicion);<br />

1


PARA i=0 HASTA 9, Inc +1<br />

* * *<br />

FINPARA<br />

SI a==b<br />

* * *<br />

FINSI<br />

SI a≠b<br />

* * *<br />

FINSI<br />

SI a ≤ b<br />

* * *<br />

FINSI<br />

escribir("El valor <strong>de</strong> n es ",n)<br />

leer(n)<br />

entero A[5]<br />

real M[3][3];<br />

for(i=0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!