Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



A table containing decimal nos. from 1 to 100 and their roman Equivalent was given. We were require..

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

Post New Answer

More General Aptitude Interview Questions

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

2 Answers   CTS,


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.

0 Answers   Accenture,


Sir, i want to SBI clerical artitude paper(previous).

0 Answers  


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.?

0 Answers   HCL,


1,2,2,4,8,?

6 Answers  


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

4 Answers  


Lowest sum of three odd number

1 Answers  


I have apptitude test for HPCL on 22 feb.2009. so,i need test question papers of that. Please help me......

0 Answers  


If an object travels at five feet per second, how many feet does it travel in one hour?

4 Answers   WNS,


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

3 Answers   IBM,


5625 ÷ 75 + &#8730;¯x = x (a) 441 (b) 400 (c) 361 (d) 484 (e) None of these

3 Answers  


Categories