by Dinesh Thakur Category: Functions

 

#include<iostream.h>

#include<conio.h>
#include <string.h>
int big (int[], int);
void main ( )
{
                int a[50],i,b,n;
                    clrscr();
                    cout<<"Enter the size of array: ";
                    cin>>n;
                    cout<<"\n Enter the elements of Array: ";
                 for (i=0; i<n; i++)
                          {
                                 cin>>a[i];
                          }
                         b = big(a,n);
                                 cout<<"Biggest number is: "<<b;
                                getch( );
}
                        int big(int a[], int n)
                         {
                                   int bi, i;
                           bi = a[0];
                           for (i=1; i < n; i++)
                                        {
                                           if(a[i]>bi)
                                                 {
                                           bi = a[i];
                                                 }
                                        }
                                                       return (bi);
                          }


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Related Articles