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

why return type of main is not necessary in linux

2091


What is time complexity c?

982


What is the importance of c in your views?

1157


What is typedef example?

1168


Tell me what is the purpose of 'register' keyword in c language?

994


What is bubble sort in c?

1037


What is a lookup table in c?

1100


What are the parts of c program?

1090


What are the preprocessor categories?

1044


What is static and volatile in c?

1214


Explain how can I open a file so that other programs can update it at the same time?

1094


What is the difference between exit() and _exit() function?

1025


What is the total generic pointer type?

1145


What does #pragma once mean?

1152


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2035