Monday, April 5, 2010

Remington Precision Mb 40

LAB 5 xD

HOLA! ME ENCUENTRO AQUI EN LA CLASE DE COMPUTO Y LES MANDO LA CLASE DE HOY WAAAAA EL VIERNES TENEMOS EXAMEN DE ESA COSA JEJE PRO WENO SIGAMOS


Para los siguientes ejercicios diseñe el algoritmo en diagrama de flujos y pseudocódigo.

Construya los diagramas de flujos de acuerdo a las reglas de construcción de los mismos. Los pseudocódigo deben usar las palabras reservadas en ingles, si es posible enumere cada una de las instrucciones. Pruebe si funciona el algoritmo con varias corridas. Use sangría para las instrucciones anidadas.

1. La regla para los años bisiestos según el calendario gregoriano es:

Un año es bisiesto si es divisible por 4, excepto el último de cada century (those divisible by 100), except that the latter is divisible by 400. That is

years that are divisible by 4 are leap years, but will not be leap years if divisible by 100 (like the 1700, 1800, 1900 and 2100) unless they are divisible by 400 (like the 1600, 2000 or 2400).

determine whether a year is a leap year entered on the keyboard.

2. Given a three-digit number, find the sum of the figures and determine the largest of its figures. Initially, the algorithm must validate that the number is actually entered three digits.

3. Write an algorithm that asks the user to enter an integer and determine if both divisible by 5 and 6, neither, or only one of them. For example if we enter the values \u200b\u200b10, 30, and 23 are the corresponding outputs.

10 is divisible by 5 or 6, but not both

30 is divisible by both 5 and 6

23 is not divisible by both 5 and 6

4. Determine the roots of the quadratic equation: ax2 + bx + c. Cover the case if the discriminant is 0 and negative.

5. In a tent made a discount to customers depending on the amount of purchase. The discount will be made based on the following criteria:

If the amount is less than S /. 500 soles, no discount

If the amount is from S /. 500 and S /. 1000 soles inclusive, apply 5% discount

If the amount is between S/.1000 and soles S/.7000 inclusive, apply 11% discount

If the amount is between S/.7000 and S / 15,000 soles inclusive, apply 18% discount

If the amount is greater than S /. 15000 soles, apply 25% discount.

Determine the amount due from a customer of the store.

0 comments:

Post a Comment