write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / akhilesh singh
main()
{
int i,j,temp,a[7]={122,198,290,71,143,325,98};
for(i=0;i<=5;i++)
{
for(j=0;j<=6;j++)
{
if(a[j]<a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("%d",a[0]);
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why header files are used?
What is table lookup in c?
What are the types of type qualifiers in c?
What is putchar() function?
Write the control statements in C language
In C programming, what command or code can be used to determine if a number of odd or even?
How can a string be converted to a number?
Where does the name "C" come from, anyway?
What do you mean by dynamic memory allocation in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
swap 2 numbers without using third variable?
What is the purpose of sprintf() function?
Which is the memory area not included in C program? give the reason
Can variables be declared anywhere in c?
What is the difference between near, far and huge pointers?