id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

andersoniii.edwin@cusd80.com > RomanCalculator
prev  |  next  |  chance

Friends, Romans, Countrymen lend me your ear. Complete this challenge and we will have a program which will allow us Romans to do arithmetic using our numerals! PART Four - ALL basic Operations - Programmers please complete the code to receive two integers and an operator character (+,-,*,/, and %), combine these numbers, and return a Roman numeral (string). Use PART TWO where we were concerned with changing 4 into "IV" example 16 will return XVI. Note the largest Roman character is M for 1000. Choose the hint for the other values and characters. REMEMBER Romans are not negative and we have not learned decimal numerals (yet), BUT we do know NOT to divide by nothing (ZERO) --return "no" for trying.


RomanCalculator(1000, 1000, "+") → "MM"
RomanCalculator(3010, 100, "%") → "X"
RomanCalculator(2400, 900, "-") → "MD"

...Save, Compile, Run (ctrl-enter)

public String RomanCalculator(int a, int b,char operator) }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 195 Post-solution available

Copyright Nick Parlante 2017 - privacy