Fahrenheit to Celsius Temperature Conversion Algorithm - Prof. Maria S. Rockett, Thesis of Marketing Business-to-business (B2B)

An algorithm written in pseudocode that converts temperatures from fahrenheit to celsius. The algorithm prompts the user to input a temperature in fahrenheit, and then calculates and displays the corresponding temperature in celsius. It also keeps track of the number of non-functional sensors encountered during the process. The algorithm continues to run until the user enters a special 'sentinel' value, at which point it terminates and displays the total number of non-functional sensors. This document could be useful for students studying programming, algorithms, or temperature conversion techniques in computer science or physics courses. It provides a clear and concise example of how to implement a simple temperature conversion algorithm using basic programming constructs.

Typology: Thesis

2022/2023

Uploaded on 11/18/2023

Pedriico
Pedriico 🇺🇸

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
FEINA PRÈVIA FAHRENHEIT YASSEN BAYECHOU
algorisme fahrenheit_a_celsius
const
DEFECTUOS -999,9
SENTINELLA -500,0
fconst
var
temperatura_en_fahrenheit , temperatura_en_celsius : reals
sensors_no_funcionals : enter
fvar
inici
sensors_no_funcionals 0
fi fals
mentre no (fi)
escriure ( “Introdueix una temperatura ( fahrenheit )
llegir ( temperatura_en_fahrenheit )
si ( temperatura_en_fahrenheit = DEFECTUOS ) llavors
sensors_no_funcionals sensors_no_funcionals + 1
sino
si ( temperatura_en_fahrenhei = SENTINELLA )
fi cert
sino
temperatura_en_celsius (temperatura_en_fahrenheit 32) * 5/9
escriure (“temperatura_en_fahrenheit”)
fsi
fsi
fmentre
escriure (“Sensors que no funcionen : “sensors_no_funcionals””)
falgorisme

Partial preview of the text

Download Fahrenheit to Celsius Temperature Conversion Algorithm - Prof. Maria S. Rockett and more Thesis Marketing Business-to-business (B2B) in PDF only on Docsity!

FEINA PRÈVIA FAHRENHEIT YASSEN BAYECHOU

algorisme fahrenheit_a_celsius

const

DEFECTUOS ← - 999,

SENTINELLA ← - 500,

fconst var

temperatura_en_fahrenheit , temperatura_en_celsius : reals

sensors_no_funcionals : enter

fvar

inici

sensors_no_funcionals ← 0

fi ←fals mentre no (fi) escriure ( “Introdueix una temperatura ( fahrenheit ) llegir ( temperatura_en_fahrenheit )

si ( temperatura_en_fahrenheit = DEFECTUOS ) llavors

sensors_no_funcionals ← sensors_no_funcionals + 1

sino

si ( temperatura_en_fahrenhei = SENTINELLA )

fi ← cert sino

temperatura_en_celsius ← (temperatura_en_fahrenheit – 32) * 5/

escriure (“temperatura_en_fahrenheit”)

fsi

fsi

fmentre

escriure (“Sensors que no funcionen : “sensors_no_funcionals””)

falgorisme