09.05.2013 Views

Universidad de Pamplona 1

Universidad de Pamplona 1

Universidad de Pamplona 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>Universidad</strong> <strong>de</strong> <strong>Pamplona</strong><br />

Facultad <strong>de</strong> Ingenierías y Arquitectura<br />

Guía <strong>de</strong>l Estudiante para Programación I – Segundo semestre 2010<br />

--------------------------------------------------------------------------------------------------------------------------------------imprimir<br />

“jubilación por antigüedad joven”<br />

Inicio<br />

sino<br />

imprimir “no tiene jubilación”<br />

e<br />

finsi<br />

fin si<br />

fin<br />

a<br />

Codificación<br />

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

int main() {<br />

int e,a;<br />

printf("digite la edad <strong>de</strong>l empleado \n");<br />

scanf("%d", &e);<br />

printf("digite la antigüedad <strong>de</strong>l empleado \n");<br />

scanf("%d",&a);<br />

if (e >= 60) {<br />

if (a >= 25){<br />

printf("jubilación por antigüedad adulta \n");<br />

} else {<br />

printf("jubilación por edad \n");<br />

};<br />

} else {<br />

if (a >= 25) {<br />

printf("jubilación por antigüedad joven \n");<br />

} else {<br />

printf("no tiene jubilación \n");<br />

};<br />

};<br />

return (0);<br />

}<br />

“No tiene<br />

Jubilación ”<br />

no si<br />

a25<br />

no si<br />

e60<br />

“Jubilación<br />

antigüedad joven”<br />

Fin<br />

no a25<br />

“Jubilación<br />

por edad”<br />

si<br />

16<br />

“Jubilación<br />

antigüedad adulta”<br />

36-Calcular el número <strong>de</strong> pulsaciones que <strong>de</strong>be tener una persona por cada 10 segundos <strong>de</strong> ejercicio aeróbico; la formula que se<br />

aplica cuando el sexo es femenino es:<br />

num. pulsaciones = (220 - edad)/10<br />

y si el sexo es masculino:<br />

num. pulsaciones = (210 - edad)/10<br />

37-Leer por teclado tres números cualquiera (A, B y C) que correspon<strong>de</strong>n a las aristas <strong>de</strong> un triángulo; el programa <strong>de</strong>be<br />

<strong>de</strong>terminar que tipo <strong>de</strong> triangulo, teniendo en cuenta la siguiente clasificación:<br />

Si los tres lados son iguales es equilátero<br />

Si solo dos lados son iguales isósceles<br />

Si todos son diferentes escalenos<br />

Solución

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

Saved successfully!

Ooh no, something went wrong!