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
What is class and object in oops?
Why do we use encapsulation in oops?
What is property in oops?
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
What is difference between abstraction and encapsulation?
how to get the oracle certification? send me the answer
Is this job good for future? can do this job post grduate student?
program for insertion ,deletion,sorting in double link list
Write a program to reverse a string using recursive function?
What is overloading in oops?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
Why do we need polymorphism in c#?
What is destructor example?
What is the real time example of inheritance?
Get me a number puzzle game-program