Pages

Friday 18 March 2011

PROGRAM TO FIND MINIMUM OF FOUR NUMBER USING FUNCTION

PROGRAM-:
#include<iostream.h>
#include<conio.h>
int min(int,int);
void main()
{
clrscr();
int a,b,c,d;
cout<<"enter four integers";
cin>>a>>b>>c>>d;
cout<<"minimun no. ="<<min(min(a,b),min(c,d));
getch();
}
int min(int x,int y)
{
return((x<y)?x:y);
}

0 comments:

Post a Comment

 
Copyright (c) 2010 Concepts Of C++. Design by WPThemes Expert

Blogger Templates and RegistryBooster.