i was just working on my algorithms for the major project, i was wondering if someone can take a look at this for me and tell me whether it's right or wrong, i'm not really good at algorithms, thanks
BEGIN MAINPROGRAM
INITIALISATION
get the book_details
set Conversion_Complete to FALSE
END INITIALISATION
WHILE Conversion_Complete = FALSE
use query search
IF exchange_details = TRUE THEN
calculate conversion
set Conversion_Complete = TRUE
ELSE
Conversion_Complete = FALSE
ENDIF
ENDWHILE
IF Conversion_Complete = TRUE THEN
report calculated conversion
ENDIF
END MAINPROGRAM
BEGIN SUBPROGRAM use query search
set exchange_details to FALSE
WHILE exchange_details = FALSE
input book_details
IF data is found THEN
exchange_details = TRUE
ELSE
exchange_details = FALSE
END IF
ENDWHILE
END SUBPROGRAM use query search
more to come, feel free to change the parts that doesn't make sense, which i'm sure there will be many
BEGIN MAINPROGRAM
INITIALISATION
get the book_details
set Conversion_Complete to FALSE
END INITIALISATION
WHILE Conversion_Complete = FALSE
use query search
IF exchange_details = TRUE THEN
calculate conversion
set Conversion_Complete = TRUE
ELSE
Conversion_Complete = FALSE
ENDIF
ENDWHILE
IF Conversion_Complete = TRUE THEN
report calculated conversion
ENDIF
END MAINPROGRAM
BEGIN SUBPROGRAM use query search
set exchange_details to FALSE
WHILE exchange_details = FALSE
input book_details
IF data is found THEN
exchange_details = TRUE
ELSE
exchange_details = FALSE
END IF
ENDWHILE
END SUBPROGRAM use query search
more to come, feel free to change the parts that doesn't make sense, which i'm sure there will be many
Last edited: