write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / mathew varghese
#include<stdio.h>
void main()
{
int a[10]={122,198,290,71,143,325,98};
int x,i;
x=a[0];
for(i=0;i<=6;i++)
{
if(a[i]>=x)
{
x=a[i];
}
}
printf("Maximum is %d \n",x);
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
What are the differences between Structures and Arrays?
Do you know pointer in c?
How can I manipulate individual bits?
What is scope of variable in c?
write a program to display all prime numbers
What is clrscr ()?
What does c mean?
how can f be used for both float and double arguments in printf? Are not they different types?
What is a rvalue?
Explain main function in c?
What is the newline escape sequence?
How can a program be made to print the line number where an error occurs?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
Explain why C language is procedural?