Programming Fundamentals/Arrays/Pseudocode

Main
Declare Real C[101] Declare Real F[213]

Call BuildC(C) Call BuildF(F) Call DisplayArray("C", C) Call DisplayArray("F", F) Call FindTemperature(C, F)

BuildC
Declare Integer Index

For Index = 0 To size(C) - 1 Set C[Index] = Index * 9 / 5 + 32 End For

BuildF
Declare Integer Index

For Index = 0 To size(F) - 1 Set F[Index] = (Index - 32) * 5 / 9 End For

DisplayArray
Declare Integer Index

For Index = 0 To size(Array) - 1 Display Name, "[", Index, "] = ", Array[Index] End For

FindTemperature
Declare Integer Temp Declare Integer Size

Set Size = GetMinimumSize(C, F) Do   Display "Enter a temperature between 0 and ", Size - 1 Input Temp While Temp < 0 OR Temp > Size - 1 Display Temp, "° Celsius is ", C[Temp], "° Fahrenheit" Display Temp, "° Fahrenheit is ", F[Temp], "° Celsius"

GetMinimumSize
Declare Integer Size

Set Size = size(C) If Size > size(F) Then Set Size = size(F) End If

Return Size