Maximum of two number
Saturday, July 4, 2009
Leave a Comment
If you need more C++ programs then comment. More comments means the more number of programs. Don't forget to tell a friend.... Do you like this website?........Keep connected....
#include<iostream.h>
#include<conio.h>
int max(int a,int b);
void main()
{
int x,y;
clrscr();
cout<<"enter two integers :";
cin>>x>>y;
cout<<"maximum="<<max(x,y);
}
int max(int a,int b);
{
if(a>b)
return a;
else
return b;
getch();
}
Output
Enter two integer :10 30
Maximum =30
0 comments »
Leave your response!