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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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