Purchase Solution

Webpage - Roman Holiday

Not what you're looking for?

Ask Custom Question

The ancient Romans developed a system for representing number values alphabetically. This "Roman numeral" system employed the following letters to symbolize the indicated numeric values:

M = 1,000 D = 500 C = 100 L = 50 X = 10 V = 5 I = 1

To convert an ancient Roman numerical to its numeric equivalent, you must sum up the values represented by each of the letters in the numeral. For example, MCVII represents 1,000 + 100 + 5 + 1 + 1 - 1,107, wheras CCIIII represents 100 + 100 + 1 + 1 + 1 + 1 = 204. By convention, letters are always listed in decreasing order of value.

Design and create a Web page named roman.html containing a text box in which the user can enter an ancient Roman numeral. When the user clicks a button, the number represented by that Roman numeral should appear in a separate text box.

As part of your page, you should define a function named RomanToNum that takes a Roman numeral (a string of letters) as input and returns the value represented by that numeral.

Once you have completed your page, use it to convert the following Roman numerals to numeric values:

MCLXVI
XXXX
MM
MXXIIII
LXXXXVIIII

Purchase this Solution

Solution Summary

This solution involves creating a webpage where a function is used to convert values into Roman numerals.

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.