how to find the largest of given numbers in an array
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / anmol.s.fattepur
void ANMOL()
{
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 ? | 1 Yes | 0 No |
What are the benefits of polymorphism?
How to hide the base class functionality in Inheritance?
Which is better struts or spring?
how to swap to variables without using thrid variable in java?
What is advantage of inheritance?
What is constructor overloading in oop?
c++ is a pure object oriented programming or not?
wht is ditch
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
Which method cannot be overridden?
What is persistence in oop?
What is a function in oop?