Menu
Question Index
...


Write a program to convert from integers to roman numerals.
Assume that inputs are from 1 to 3999, otherwise return 'Invalid Input'.

Input (Integer) Output (String)
786 DCCLXXXVI
10 X
3 III
501 DI
934 CMXXXIV
-1 Invalid Input
4200 Invalid Input

class ConvertToRomanNumerals

{    public static void main(String s[])
    {
        System.out.println("Corresponding Roman Numeral of 786 is : " + convertToRomanNumerals(786));

    }


public static String convertToRomanNumerals(int input) {
//Write code here to convert from integers to roman numerals
}
}

Doubts

Problems

Topic: Java String Arrays - String Arrays In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App