write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / divya
#inclufe<stdio.h>
Void main()
{
int a[7];
for(i=0;i<=7;i++)
{
printf("Enter the nos");
scanf("%d",&a[i]);
}
for(i=0;i<=7;i++)
{
if(a[i]>a[i+1])
printf("%d",a[i]);
else
if(a[i]<a[i+1])
printf("%d",a[i+]);
else
if(a[i]==a[i+1])
printf("%d",a[i]);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what do the 'c' and 'v' in argc and argv stand for?
List the variables are used for writing doubly linked list program.
I heard that you have to include stdio.h before calling printf. Why?
I have a varargs function which accepts a float parameter?
Write a program to reverse a linked list in c.
What is the best organizational structure?
Can we change the value of static variable in c?
What are the parts of c program?
regarding pointers concept
In a header file whether functions are declared or defined?
Differentiate between a structure and a union.
Difference between macros and inline functions? Can a function be forced as inline?
Do you know pointer in c?
What is cohesion and coupling in c?
Write a program on swapping (100, 50)