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

In 1991, was the number of people in City A three times greater then the number of people in City B? 1) In 1991, there were approximately 1.1 million more people in City A than in City B. 2) In 1991, the 300,000 Catholics in City A made up 20% of its population, and the 141,000 Buddhists in City B made up 30% of its population. a) if statement (1) ALONE is sufficient, but statement (2) alone is not sufficient to answer the question. b) if statement (2) ALONE is sufficient, but statement (1) alone is not sufficient to answer the question. c) if BOTH statements (1) and (2) TOGETHER are sufficient to answer the question asked, but NEITHER statement ALONE is sufficient. d) if EACH statement ALONE is sufficient to answer the question asked. e) if statements (1) and (2) TOGETHER are NOT sufficient to answer the question asked, and additional data specific to the problem are needed.

4 Answers   Wipro,


An equilateral triangle of sides 3 inch each is given. How many equilateral triangles of side 1 inch can be formed from it?

0 Answers   3i Infotech, Canara Bank, Geodesic, Mu Sigma,


Number Series 18,20,22,20,28,20,?

16 Answers   IBM, KD, TCS,


The major component of CNG is a. Ethane b. Propane c. Butane d. Methane

7 Answers   SSC,


What amount of compound interest can be obtained on an amount of Rs. 4500 at the rate of 4% p.a. at the end of 2 years?

0 Answers   Axis Bank,


12 men can build wall of length of 12m in 10 days how many men are required to build 20 m in 15 days.

0 Answers   Celstream,


What number comes next 10, 9, 60, 90, 70 and 66?

0 Answers   Google,


salary is 's' per month,'x'% of salary is given as bonus, if 3 months salary is s1,s2 & s3 then what is his salary.

3 Answers   Wipro,


Jack & Jill went to the hill....In going to hill (upword Direction)...Jack went to the hill first nd waited for Jill for "x" hours.. Jack's speed was then twice of Jill.. In the down word direction Jill can go 3km in a hour, while Jack can go 1km in 1 hour.. Jill reach the ground 1st nd waited for Jack for "x" hours.. Total journey they traveled is 6 km.. Find the speed of Jack...

3 Answers   CTS,


The average of x and y is 6.5. if z=4,what is the average of x,y,z.

0 Answers   Caritor Solutions,


A man drives at a speed of 40 miles/hr while his friend drives at a speed of 50 miles/hr. If the friend leaves 30 minutes after the man, when are they going to meet?

0 Answers   CGI,


Q) Frank is 15 years younger then John. In 5 years John will be twice as old as Frank. How old will Frank be in four years? a) 8 b) 10 c) 12 d) 14 e) 16

4 Answers  


Categories