A table containing decimal nos. from 1 to 100 and their
roman Equivalent was given. We were required to write a
function : char* ConverToRoman(int number) : to
convert the given number( 1<=number<=100) into its numerical
equivalent.
I want a solution in C/C++ language
Answer / monu rohila
public static string GetPalindromeString(string theInputString)
{
int j = 0;
int k = 0;
string aPalindrome = string.Empty;
string aLongestPalindrome = string.Empty ;
for (int i = 1; i < theInputString.Length; i++)
{
k = i + 1;
j = i - 1;
while (j >= 0 && k < theInputString.Length)
{
if (theInputString[j] != theInputString[k])
{
break;
}
else
{
j--;
k++;
}
aPalindrome = theInputString.Substring(j + 1, k - j - 1);
if (aPalindrome.Length > aLongestPalindrome.Length)
{
aLongestPalindrome = aPalindrome;
}
}
}
return aLongestPalindrome;
}
`
| Is This Answer Correct ? | 1 Yes | 14 No |
out of 55 eggs 5 are defective. what is % of defective eggs
if the sum of five consecutive nos. 35? how many prime numbers are there :
A & B are playing a game .There are 8 oranges in a row on the table.one Player can take 1-4 oranges in a pick (a maximum of 4),one who picks the last orange wins the game.'A' plays first How many oranges should he pick first time inorder to win the game.
Which is the largest??? a)(125)^15 b) (5)^125 c) (625)^20 d) (25)^10
a student is ranked 13th from right and 8th from left.how many are there?
Total balls z,red balls N remaining are blak balls,then %of black balls equal to
how do to prepare the sbi exam
0 Answers State Bank Of India SBI,
what would be the next number in the sequence 2. 20, 74, 110 ?
24 Answers HCL, TCS,
What is the eligibility criteria for SBI Clerks? I have 55% in 12th & 73% in Graduation, so m i eligible for the post, please let me know at the earliest.!!!
INDIA HAS SO WITNESSED...........CENSUSES BY 2011. (A) 12 (B) 13 (C) 14 (D)15
One of the longest sides of the triangle is 20 m. The other side is 10 m. Area of the triangle is 80 m2. What is the another side of the triangle?
Delhi's population is increasing day by day what is the reasong behind it & how can we solve it. G.D QUESTION (amit_nirwan@yahoo.com)