473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I need to write a program to verify if a given roman numeral is valid

I don't know why, but I'm having a tough time thinking of the best way to do this. I need to parse a string of input roman numerals and output if it is a valid roman numeral or not. Any ideas!! Needs to use strings.

Thanks in advance.
Sep 29 '07 #1
2 1598
Ganon11
3,652 Expert 2GB
Well, first you should think of all the rules that define what a Roman Numeral is. For instance, it can only contain the letters I, V, X, C, M, L...and maybe a few others I can't think of. Also, what order do these letters have to be in? Once you come up with a good list of rules a roman number has to follow, only then should you think about writing a function to implement these rules.
Sep 29 '07 #2
you should ask grigoletti, he's real good at this.
Oct 11 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: level9 | last post by:
How can I convert roman numerals to intergers in c++ VS 6?
0
by: Support | last post by:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head>...
13
by: Christopher Benson-Manica | last post by:
Inspired by a thread on clc++, I decided to try it out... #include <stdio.h> #include <stdlib.h> int main( int argc, char *argv ) { int i; int result=0; int this;
2
by: Jeffrey A. Voigt | last post by:
Can someone tell me why this was not provided in .net? Or can someone at least point me in a direction to download a class file to handle this for me? Thanks, - jv
16
by: Roman Mashak | last post by:
Hello, All! I wrote function parsing the fully-quilified domain name and extracting 'host' and 'domain' parts seperately. The important thing for me is to keep original string (pointed by 'fqdn'...
9
by: santosh | last post by:
Hello all, I've put together a small program to count the number of characters and 'words' in a text file. The minimum length of a word, (in terms of no. of characters), as well as word...
0
by: service | last post by:
This is a multi-part message in MIME format --siNt1NhCoyB3mEPydjXJyOTcg=_X6kQe0H0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable - This mail is a HTML mail. Not all...
8
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
2
by: tonesgirl85 | last post by:
I need some direction to know if I am on the right track. Please contique program below. import java.util.*; public class Roman { static Scanner console = new Scanner(System.in);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.