-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
CC Programming LanguageC Programming Languagec++C++ Programming LanguageC++ Programming LanguageeasyEasy QuestionEasy Questiongood first issueGood for newcomersGood for newcomershacktoberfestHacktoberfest IssueHacktoberfest Issuehacktoberfest-2023Hacktoberfest 2023 IssueHacktoberfest 2023 Issuehacktoberfest-acceptedAccepted for HacktoberfestAccepted for HacktoberfestjavaJava Programming LanguageJava Programming Languagenot-assignedIssue Not assigned yetIssue Not assigned yetpythonPython Programming LanguagePython Programming LanguagestringQuestion related to stringQuestion related to string
Description
❗Write Code in Only One Language ( CPP , C , Java , Python )
Give File Name : ConverttoRomanNo ✅ In respective language folder
📑 DESCRIPTION
Convert to Roman No
Given an integer n, your task is to complete the function convertToRoman which prints the corresponding roman number of n. Various symbols and their values are given below
Note:- There are a few exceptions for some numbers like 4 in roman is IV,9 in roman is IX, similarly, 40 is XL while 90 is XC. Similarly, 400 is CD while 900 is CM
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
Example 1:
Input:
n = 5
Output: V
Example 2:
IInput:
n = 3
Output: III
Your Task:
Complete the function convertToRoman() which takes an integer N as input parameter and returns the equivalent roman.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CC Programming LanguageC Programming Languagec++C++ Programming LanguageC++ Programming LanguageeasyEasy QuestionEasy Questiongood first issueGood for newcomersGood for newcomershacktoberfestHacktoberfest IssueHacktoberfest Issuehacktoberfest-2023Hacktoberfest 2023 IssueHacktoberfest 2023 Issuehacktoberfest-acceptedAccepted for HacktoberfestAccepted for HacktoberfestjavaJava Programming LanguageJava Programming Languagenot-assignedIssue Not assigned yetIssue Not assigned yetpythonPython Programming LanguagePython Programming LanguagestringQuestion related to stringQuestion related to string