Answer Posted / namitha
#include<iostream.h>
main()
{
int a[10],n;
cout<<"enter ten numbers:\n";
for(int i=0;i<10;i++)
{
cin>>a[i];
}
int max=a[0];
for(i=0;i<10;i++)
{
if(a[i]>max)
max=a[i];
}
cout<<"the maximum number is:"<<max<<endl;
}
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is the use of structure in c++?
why and when we can declar member fuction as a private in the class?
Discussion on error handling of C++ .
Explain binary search.
Explain differences between alloc() and free()?
What is the hardest coding language to learn?
Why is c++ is better than c?
What things would you remember while making an interface?
If you don’t declare a return value, what type of return value is assumed?
How to declaring variables in c++?
Why do we use classes in programming?
What does ios :: app do in c++?
In the derived class, which data member of the base class are visible?
Explain rethrowing exceptions with an example?
Is c++ built on c?