programming

285 0 0
                                        

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int a[10],n,i,max;

cout<<"Enter the size of the array and enter it ";

cin>>n;

for(i=0;i<n;i++)

{

cin>>a[i];

if(i==0)

max=a[i];

if(max<a[i])

max=a[i];

}

cout<<"maximum is "<<max;

getch();

}

You've reached the end of published parts.

⏰ Last updated: Jan 05, 2009 ⏰

Add this story to your Library to get notified about new parts!

programmingWhere stories live. Discover now