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

how to find the largest of given numbers in an array

Answer Posted / jvhariharan

void main()
{
int a[10],i,max,m;
pf("enter the range of array");
sf("%d",&m);
pf("enter the values:");
for(i=0;i<m;i++)
{sf("%d",&a[i]);
}
max=a[0];
for(i=1;i<m;i++)
{if(a[i]>max)
{max=a[i];
}}
pf("the max no:%d",max);
}

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class and object in oops?

1069


Why do we use encapsulation in oops?

973


What is property in oops?

990


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

2226


What is difference between abstraction and encapsulation?

1021


how to get the oracle certification? send me the answer

2103


Is this job good for future? can do this job post grduate student?

2092


program for insertion ,deletion,sorting in double link list

2641


Write a program to reverse a string using recursive function?

2278


What is overloading in oops?

1094


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4679


Why do we need polymorphism in c#?

1100


What is destructor example?

991


What is the real time example of inheritance?

1082


Get me a number puzzle game-program

2183