Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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.

1697


What are the differences between Structures and Arrays?

1226


Do you know pointer in c?

1061


How can I manipulate individual bits?

1052


What is scope of variable in c?

1054


write a program to display all prime numbers

1981


What is clrscr ()?

1119


What does c mean?

1064


how can f be used for both float and double arguments in printf? Are not they different types?

1081


What is a rvalue?

1211


Explain main function in c?

1094


What is the newline escape sequence?

1083


How can a program be made to print the line number where an error occurs?

1089


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

1114


Explain why C language is procedural?

1232