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 is volatile variable in c?
Where static variables are stored in memory in c?
What does static variable mean in c?
What is pointer in c?
What is pragma c?
Explain how do you sort filenames in a directory?
What are the different types of pointers used in c language?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Explain Basic concepts of C language?
Explain how do you print only part of a string?
When is a “switch” statement preferable over an “if” statement?
In C language what is a 'dangling pointer'?
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
What is wrong with this initialization?
Which is the best website to learn c programming?