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 are friend classes?
What is the main function c++?
Why do you use the namespace feature?
Write a C++ Program to check whether a number is prime number or not?
What is the use of map in c++?
What is bubble sort c++?
What do you mean by late binding?
Explain "const" reference arguments in function?
What are 2 ways of exporting a function from a dll?
What are friend functions in C++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Write my own zero-argument manipulator that should work same as hex?
what are the decision making statements in C++? Explain if statement with an example?
What is the use of function pointer?