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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

If a car starts from A towards B with some velocity due to some problem in the engine after travelling 30km.If the car goes with 4/5 th of its actuval velocity the car reaches B 45min later to the actual time. If the car engine fails ofter travelling 45km, the car reaches the destination B 36min late to the actual time , what is the initial velocity of car and what is the distance between A and B in km ans) 20 &

1150


A batsman scored 120 runs including 16 fours and 2 sixes. What percentage of his total score did he make by running between the wickets?

1446


in pure milk if 20% replaced by water and in this again 20% is replaced by water and again 20% is replaced by water then what is the proportion of milk in that mixture

1360


Radha,Geeta&Revathi went for a picnic.After a few days they forgot the date,day and month on which they went to picnic.Radha said that it was on Thursday,May 8 and Geeta said that it was Thursday May 10.Revathi said Friday Jun 8.Now one of them told all things wrongly,others one thing wrong and the last two things wrongly.If April 1st is tuesday what is the right day,date and month? thought that he should not waste his time and started moving towards his residence at the speed of 3mi/hr.On the way,he gets the coach and reaches home at 6 o'clock.How far is his residence from railway station.

1396


if the word 'ddosszm' is changed to 'central' then what will be the change for 'rtjbl' ?

1511


Two pipes A and B when working alone can fill a tank in 36 minutes and 45 minutes respectively. A waste pipe C can empty the tank in 30 minutes.First A and B are opened After 7 minutes. C is also opened . In How much time will the tank be full ?

1176


8 to the power of x is 32,what is the value of x?

1231


In a class total 34 students, 16 are have a brother, 15 are have sisters, 9 students don't have either brothers or sisters.Find the number of students having both brother and sisters.

1780


There are two balls touching each other circumferencically. The radius of the big ball is 4 times the diameter of the small ball.The outer small ball rotates in anticlockwise direction circumferencically over the bigger one at the rate of 16 rev/sec. The bigger wheel also rotates anticlockwise at Nrev/sec. what is 'N' for the horizontal line from the centre of small wheel always is horizontal.

1083


A plane starts from a place A , it goes 1000 kms south then 1000km east then 1000 km north and 1000km west, what is it distance from the starting place? ans.same starting place.

1501


Four Members A, B, C, D are playing a game .A person losing a game should double the amount of others .B, C, D are losing in order after three games .The amount after 3 games are A&B having 40,D is having 16&C 80.What amount did B have?

1190


A father is 30 years older than his son however he will be only thrice as old as the son after 5 years what is father's present age ?

1317


For a 13-bit DAC the MSB resistance is 2kohms. What is the LSB resistance ?

1557


One person meet his friend on 12:30 then on 1:20 on second day, on third day -----?

1121


500 men are arranged in an array of 10 rows and 50 columns . ALL tallest among each row are asked to fall out . And the shortest among THEM is A. Similarly after resuming that to their original positions that the shortest among each column are asked to fall out. And the longest among them is B . Now who is taller among A and B ?

1400