Function to convert a decimal input into roman numerals

Assignment Help Programming Languages
Reference no: EM1353509

Q1) Write a function that converts a decimal input into Roman Numerals. Your function will take in a number and output a string. You will want to make use of the function string-append, which concatenates two (or more) strings together into a single string with no spaces.
(string-append "ab" "cde") => "abcde"

In Roman Numerals, M = 1000, D = 500, C = 100, L = 50, X = 10, V = 5, and I = 1. Combinations of letters next to each other change the total value depending on order. For example, XL = 40, VIII = 8, and MCCXLI = 1241.

(1a) Write a recursive version of this function.

(1b) Write an iterative version of this function.

Reference no: EM1353509

Questions Cloud

Significance of birth order and personality development : Do you know of a family that depicts Adler's theory of the significance of birth order and personality development?
Benefits of cross-cultural training : Benefits of Cross-Cultural Training - How could genetic testing be used to discriminate
Personality theories for charles darwin : pick two other personality theories for Charles Darwin and explain how these theories differ in terms of how they explain the patterns of traits in Charles Darwin's Life.
Explain what are the some of the strategies : Explain What are the some of the strategies out there for dealing with risks? Why might a PM utilize a particular approach?
Function to convert a decimal input into roman numerals : Write a function that converts a decimal input into Roman Numerals. Your function will take in a number and output a string.
Perceptions of american culture : Perceptions of American Culture - ugly Americans by people in other countries because some Americans at times do portray
Real cost of hedging payables : Suppose that Loras Corporation imported goods from New Zealand and needs 100,000 New Zealand dollars 180 days from now.
Calculation of ratios : Use the financial statement and additional data, calculate at least five of the following ratios for Alley corporation for 2009.
Personality assessments used in business : Select two standard personality assessments used in business and industry. Keep in mind that these need to be actual, reputable personality assessments which have data to support their use

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a multi-threaded competition

Create a multi-threaded competition

  Program that uses for loop prompt user to input two integers

Write a program that uses for loop to preform the following steps: Prompt the user to input two integers: firstnum and secondnum.

  Application to inputs five numbers given between a range

Write an application that inputs five numbers, each between 10 and 100, inclusive. As each number is read, display it only if it's not a duplicate of a number already read.

  Using the irvine32 library functions

Create 32 random points which have (x, y) co-ordinates

  Create a multi-threaded competition

Create a multi-threaded competition in which opposing Robin Hoods will attack one another and try to take each other's gold coins.

  Program to print chains of numbers within a range

Write a program to print the chains for the numbers within a range that the user specifies.

  Program to calculate and displays number of miles per hour

Design a program to calculate and displays the number of miles per hour over the speed limit that a speeding driver was doing

  Write a script to declares and sets variable

Write a script that declares and sets a variable thats equal to the total outstanding balance due. If that balance due is greater than $10,000.00.

  Explaining exception handling using program

Use exception handling appropriately. Use comments to illustrate the various concepts applied / utilized in the solution.

  Create a dtd for a small xml data set

Create a DTD for a small XML data set drawn from the Stanford course catalog. There are multiple departments, each with a department chair.

  Program to compute perimeter and area of rectangle

Write a program that asks for length L and the width W of a rectangle, then compute perimeter and area of the rectangle.

  Program to print total balances forward and total withdrawal

At the end of report, print total balances forward, total deposits, total interest earned, total withdrawals and total final account balances.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd