// Diplaying Maximum number from array
// Programmer name: Sohail Ahmed
// Dated: 16/05/2011
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int array[10]={21,3251,76,12,35,49,756,35,46,35};
int num=array[0];
for(int index=1; index<=10; index++)
{
if(array[index]>num)
{
num=array[index];
}
}
cout<<"\nMaximum number: "<<num;
getch();
}
0 comments:
Post a Comment