Algoritmica i clase06 practica 6 solucionario

  • 95 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
95
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. UNMSM – FISI Algorítmica I Solucionario - Práctica N° 6 Punteros Solucionario 1: VARIABLES Entero : x Puntero : ap1 , ap2 ACCION Hallar_x x5 xx+2 ap1  &x ap1  x + ap1 ap2  ap1 ap1  2*(ap2)/(ap1) Escribir("El valor de x es : ", x ) FIN_ACCION Solucionario 2: VARIABLES Entero : a Puntero : ptr ACCION Hallar_resultado ptr  &a a  a + 10 ptr  ptr + 10 Si ( a < 20 ) Entonces Escribir("a es menor que 20") Sino Escribir("a es mayor o igual a 20") Fin_Si FIN_ACCION Solucionario 3: VARIABLRES Entero : a , b , c Puntero : p1 , p2 ACCION Mostrar_variables p1  &a p1  1 p2  &b p2  2 UNMSM-FISI . 1
  • 2. UNMSM – FISI Algorítmica I p1  p2 p1  0 p2  &c p2  3 p1  1 Escribir("El valor de a es ", a ) Escribir("El valor de b es ", b ) Escribir("El valor de c es ", c ) FIN_ACCION UNMSM-FISI . 2