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 difference between oop and pop?
How to improve object oriented design skills?
What are the 3 pillars of oop?
Whats is abstraction in oops?
c++ program to swap the objects of two different classes
What is the oops and benefits of oops programming?
What is advantage of inheritance?
What is purpose of inheritance?
Why interface is used?
Which language is pure oop?
What is overriding in oops?
What is encapsulation in ict?
What are the three parts of a simple empty class?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What is the real time example of inheritance?