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...

ques-Input an array and prints the second minimum in an array??
Example
Input:34,45,21,12,54,67,15
Output:15
I want a solution in C/C++ language

Answer Posted / om prakash

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int ar[6]={21,23,14,65,2,35};
int min1=ar[0],min2=ar[0];
for(int i=1;i<6;i++)
{
if(min1<ar[i])
{
int min2=min1;
min1=ar[i];
}
}
print(min2);
getch();

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Refer to the figure below.A ship started from P and moves at a speed of I miles per hour and another ship starts from L and moving with H miles per hour simultaneously.Where do the two ships meet? ||---g---||---h---||---i---||---j---||---k---||---l---|| PG H I J K L are the various stops in between denoted by || . The values g, h, i, j, k, l denote the distance between the ports.

1280


in a question ,last part has, the ages of two people has the ratio of 6:6 and by adding the numbers we get 44, after how many years the ratio would be 8:7?

1380


Find the next series: BC CE EG GK ?

1703


Find the value of @@+25-++@1..., where @ denotes "square" and + denotes "square root".

1229


in space ship 5men are going1.doctor,drug asdditive 2.lady lawer has done crime 3.teacher emotinally imbalanced 4. 18 year old aeruonautical engineer 5. noble lauraut .suddenly some thing happend and oxygen is available to only three people to use which of three you choose

1296


There are 5 red shoes, 4 green shoes. If one drasw randomly a shoe what is the probability of getting redshoe is

1601


HERE = COMES – SHE, (Assume s = 8), Find value of R + H + O

1767


Pipe A can fill a tank in 30 mins and Pipe B can fill it in 28 mins.If 3/4th of the tank is filled by Pipe B alone and both are opened, how much time is required by both the pipes to fill the tank completely ?

1141


Pankaj walks east and turns right and then from there to his left and then 45degrees to his right. In which direction did Pankaj go?

1228


The difference between two numbers is 1365. When you divide the larger number with the smaller number the quotient is 6 and remainder is 15. What is the smaller number?

1195


Daal is now being sold at Rs. 20 a kg. During last month its rate was Rs. 16 per kg. By how much percent should a family reduce its consumption so as to keep the expenditure fixed?

1559


Perimeter of the back whell = 9 feet, front wheel = 7 feet on a certain distance the front wheel gets 10 revolutions more than back wheel . what is the distance?

1307


There are following denominations of money: 1, 2, 5, 10, 20, 50, and 100 paise. Alex has as twice mony as David, who has as twice as Bindya, who again has as twice money as Charles. Each has two coins in hand. Which coins Bindya has?

1257


Find the speed of the boat in still water if the river runs at 4 km/hr. The time taken by a Suresh to row the boat upstream is 3 as the time taken by him to row it downstream.

1483


What Is Kyc?

1287