One of the principal stumbling blocks in the early development of mathematics was the notation used for numbers before the “Arabic” or “decimal” number system was introduced, since some of the older number systems were quite unsuited for arithmetic. As an example, the Roman system of numbers makes use of the symbols M (with value 1000), D (value 500), C (value 100), L (value 50), X (value 10), V (value 5), and I (value 1).
In the “old Roman” or “Classical” system a number is a sequence of M’s, D’s, C’s, L’s, X’s, V’s, and I’s in that order, the value of a number just being the sum of the values of the individual symbols.
Write a program that will convert a classical Roman numeral to a decimal number.
Easy, but maybe not the best solution:
I = userinput;
if(I>=5)
{
V = Math.round(I/5);
I=I%5;
}
else if(V>=2)
{
X=Math.round(V/2);
V=V%2;
}
didn't try it, just wrote it here quickly.
Sure, there are better solutions.
HILFE - Gästebuch - VIDEOS EINBINDEN BBCODE (Java Programming) 01/22/2012 - Web Development - 2 Replies Ich brauche Hilfe bei meinem Gästebuch.
Kann mir jmd die funktion geben um Videos ins Gästebuch einzubinden.?
Beispiel:
Kamioka - Hands Up vs. Hardstyle Mixtape'1 - YouTube
function InsertURL()
{
var url = GetSelectedText(document.posting.p_text);
INFIX TO POSTFIX JAVA PROGRAMMING[HELP] 01/13/2012 - General Coding - 2 Replies Good Day Elitepvpers. Can some of you give me a source code of converting infix to postfix ? and also postfix to infix. I just badly need it. I'm still using search engines now. And also i need some helping hands here. I need a program with an input process.
Sample Program:
Input : (a+b)*c/(d+e)*f
Output: ab+c*de+f*/
Hope u can help me with these. Thank you !
Java Programming Help Again please :'( 10/06/2011 - General Coding - 1 Replies How do i do this program???
Create an array that will Input a year (valid years are starting from 1900 onwards) then output the index number and the animal sign of the entered year. These are the sequence of the animal signs: RAT, OX, TIGER, RABBIT, DRAGON, SNAKE, HORSE, SHEEP, MONKEY, ROOSTER, DOG, PIG.
Sample output:
Enter a year: 1200
<<VALID INPUT STARTS AT 1900>>
Enter a year: 1984
Java Programming 10/11/2008 - CO2 Programming - 10 Replies Hi guys, i am an experienced 2 year computer science HL java programmer :P just wondering where to start off to making programs for co? i wana make a new auto-clicker with timed clicks for intensify and a guard leveler :P