EJEMPLOS CUARTETOS Y TERCETOS.docx

1
Lenguajes y autómatas II Martes 18 de marzo del 2014 EJEMPLOS CUARTETOS Y TERCETOS int i = 0; int suma = 0; while(i<5) { suma=suma+I; } double res=(suma/3)*15 Cuartetos (=,0, ,i) (=,0, ,suma) (Label, , ,LinicioWhile) (<,i,5,T1) (iff,T1, ,LFinWhile) (+,suma,i,suma) (goto, , ,LinicioWhile) (Label, , ,LFinWhile) (/,suma,3,T2) (*,T2,15,res) ( , , , ) Tercetos 1. (=,0,i) 2. (=,0,suma) 3. (<,i,5) en este terceto se encontrara el resultado 4. (iff,(3),(8)) 5. (+,suma,i) 6. (=,suma,(5)) 7. (goto, ,(3)) 8. (/,suma,3) 9. (*,(8),15) 10. (=,(9),res) 11. ( , , , )

Transcript of EJEMPLOS CUARTETOS Y TERCETOS.docx

Lenguajes y autmatas II Martes 18 de marzo del 2014EJEMPLOS CUARTETOS Y TERCETOS

int i = 0;int suma = 0;while(i