Solo disponible en BuenasTareas
  • Páginas : 2 (359 palabras )
  • Descarga(s) : 0
  • Publicado : 14 de marzo de 2012
Leer documento completo
Vista previa del texto
Algorithms – Activity 8
Read the following problems and create an algorithm and a flowchart for each one.
EXAMPLE: Apollo I used 167 days to go from Earth to Mars,that is 34’900,000 miles away from the Earth. Make an algorithm to calculate the days that it would need to go to Jupiter that is 864’875,457 miles away from Earth.
1. Set constants.TtM=167, DtM=34, 900, 000, DtJ= 864, 875, 457
2. Set variables= Diad= 0, TtJ=0
3. Diad= DtM/TtM
4. TtJ= DtJ/Diad
5. Print= the time to go to Jupiter is “TtJ” “days”

6. The formulato convert kilograms to pounds is P=K*2.2, where P is pounds and K is Kilograms. Make an algorithm that converts any amount of Kilograms to pounds.
1. Set constants. P=K*2.2
2. Setvariables= P= pounds, K= kilograms, Answer=0
3. Answer= K*2.2
4. Show answer
7. A student makes 4 exams. Make an algorithm to calculate and show the average of its grades.
1.Set variables= A,B,C,D, SUM=0, AVG=0, NoE=4
2. SUM= A+B+C+D
4. Show average
8. The temperature is the measure of concentration or intensity of heating energy in abody. There are 4 scales to measure temperature: Fahrenheit, Celsius, Kelvin and Rankine. Many labs experiments require the conversion from one scale to other. For example, to convert from Fahrenheitto Celsius, you sustract 32 to Fahrenheit temperature and the difference is multiplied by 5/9; to convert from Celsius to Kelvin, you add 273 degrees to the temperature in Celsius; and for convertingfrom Fahrenheit to Rankine, you add 460 degrees to the temperature in Fahrenheit. Make an algorithm that calculates and prints the given temperature in Fahrenheit (F) in the other 3 Measures.
START1. Set variables (Fahrenheit, Celsius, Kelvin, Rankine, T=0)
2. Celsius=( Fahrenheit-32)*(5/9)
3. Kelvin= Celsius+273
4. Rankine= Fahrenheit+460
5. Show= T in Celsius= Celsius, T...
tracking img