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
Is swift a good first language?
How much do coding jobs pay?
How can virtual functions in c++ be implemented?
Define 'std'.
Explain terminate() function?
Explain queue. How it can be implemented?
What is namespace std; and what is consists of?
What are the 2 main types of data structures?
What are pointer-to-members in C++? Give their syntax.
Can we define function inside main in c++?
What is the best c++ book for beginners?
Are there any special rules about inlining?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What is different in C++, compare with unix?