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
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
Is there sort function in c?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What are the standard predefined macros?
Write a program to know whether the input number is an armstrong number.
Why is sprintf unsafe?
What is #define used for in c?
How can a program be made to print the name of a source file where an error occurs?
Can one function call another?
Write a program to print “hello world” without using semicolon?
Is a house a mass structure?
What are actual arguments?
What is the advantage of a random access file?
Can you please compare array with pointer?
What is scope and lifetime of a variable in c?