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 project in xcode

Create a new project in XCode using the Mac OS X/Command Line Tool template

  Application development and programming languages

Application Development and Programming Languages,  Programming languages have evolved since the First Generation Languages (1GLs) in the 1940s. The 1GLs were machine languages, which interacted directly with hardware. 2GLs were assembly languages. F..

  Design application that gets customer account data

Design an application that gets customer account data that includes an account number, customer name, and balance due.

  Program to prompt a user for hourly pay rate

Create program called "calculatePay" which will prompt user for their hourly pay rate.

  Reducing the average memory access time

Suppose that increasing the line size to 128 bytes increases the H to 0.97. Does this reduce the average memory access time?

  Program to display the bonus

product receives a 5% bonus, otherwise, he receives a 4% bonus. Display the bonus, formatted with a dollar sign and two decimal places, in the bonusLabel.

  Design a benefits election system

Individual project for this course is in form of Service Request from Huffman Trucking. It is essential for student to access Service Request: SR-ht-001. Design a Benefits Election System.

  Solve the programming problem

Solve the programming problem

  Creating message box to display member name

Ddefine for your class is a method to design a message box to display member name, car year and model, and year member joined club.

  Php code to add-delete product using ajax programming

PHP Code to add a new product and delete a existing product Implement AJAX Programming based solutions to write code to add a new product to the database.

  Write a perl program

Write perl program which will run on my system and will start another perl program on another linux system. The main program should wait for linux perl program to complete its work and send the result to my main perl program.

  Computing first seven values of fibonacci number sequence

Write a program that uses a loop to compute the first seven values of the Fibonacci number sequence.

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