2023-4: Like a Version
One common software version numbering scheme is known as "semantic versioning". Typically, semantic versioning uses three numbers representing a major version number, a minor version number, and a build number.
The major version is incremented when a new version of the software introduces changes that would make existing applications using the software fail or behave differently.
The minor version is incremented when new features are added that didn't previously exist — no pre-existing use of the software will fail in this case.
The build number is incremented for bug fixes and similar changes.
Write code that:
Takes 3-element integer vector first and second arguments each representing a major version, minor version, and build number.
Returns
¯1 if the first argument represents a version number older than the second argument
0 if the first argument represents a version number equal to the second argument
1 if the first argument represents a version number newer than the second argument