projects / schoolwork / numerals


numerals

This program is written in C++ and utilizes a finite state machine to determine the validity of a numeral the user enters. After the user enters their number, it is processed in the machine and is determined whether or not it belongs in the language of Roman Numerals.

It was written for my Theoretical Foundations course in Fall 2018. The program works by taking the string the user provides (input) and compares it to a finite state table. While parsing the string, it will continue to move through the table until it has reached either an accept state or a dead state. When the string has been fully parsed, the program outputs the result of the state table.



code


Loading...