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 |
Find the number WXYZ divisible by 36? i)let the digits be5,4,3,6 ?not in that order ii)sum of last two digits is 9 iii) sum of middle two digits is 7
A software engineer has the capability of thinking 100 lines of code in five minutes and can type 100 lines of code in 10 minutes. He takes a break for five minutes after every ten minutes. How many lines of codes will he complete typing after an hour?
15 Answers Aptroid, CTS, TCS,
Using the digits 1,5,2,8 four digit numbers are formed and the sum of all possible such numbers.
Sir, i want to SBI clerical artitude paper(previous).
A Lorry starts from Banglore to Mysore At 6.00 a.m, 7.00 a.m, 8.00 a.m.....10 p.m. Similarly another Lorry on another side starts from Mysore to Banglore at 6.00 a.m, 7.00 a.m, 8.00 a.m.....10.00 p.m. A Lorry takes 9 hours to travel from Banglore to Mysore and vice versa.?
1,2,2,4,8,?
In a certain code language DESERT is written RTSEDE. How will the word FAULTS the written in that code language? (a) TSULFA (b) AFLUST (c) LUAFST (d) UAFSTL (e) None of these
Lowest sum of three odd number
I have apptitude test for HPCL on 22 feb.2009. so,i need test question papers of that. Please help me......
If an object travels at five feet per second, how many feet does it travel in one hour?
A square plot of some size , at four corners equal squares of some size are cut and is formed as open box. If this open box carries 128ml of oil. What is the size of the plate i.e. side a.17 b.14 c.13
5625 ÷ 75 + √¯x = x (a) 441 (b) 400 (c) 361 (d) 484 (e) None of these