Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
Conversion of roman numerals to decimal. More...
#include <assert.h>
#include <stdio.h>
#include <string.h>
Functions | |
int | symbol (char symbol) |
for assert More... | |
int | roman_to_decimal (char input[]) |
Converts roman numerals into a decimal number. More... | |
static void | test () |
Self-test implementations. More... | |
int | main () |
Main function. More... | |
Conversion of roman numerals to decimal.
Roman numerals are an ancient Roman numeral system consisting of the symbols I, V, X, L, C, D, and M
int main | ( | void | ) |
int roman_to_decimal | ( | char | input[] | ) |
Converts roman numerals into a decimal number.
input | Input roman numeral as a C-string |
int symbol | ( | char | symbol | ) |
for assert
for IO operations for strlen()
Convert roman numeral symbol to a decimal value helper function
symbol | Roman numeral char |
|
static |
Self-test implementations.