HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C program to Input an Array of 5 Elements and Find Maximum Elements ?


Q:- Write a C program to Input an Array of 5 Elements and Find Maximum Elements ?
            #include<stdio.h>
            #include<conio.h>
            main()
    {
int a[5],max=-32768,i;
clrscr();
printf(“Entr 5 Elements =”);
for(i=0;i<5;i++)
{
scanf(“%d”,&a[i]);
if(a[i]>max)
max=a[i];
}
printf(“Maximum Element =%d”,max);
getch();
      }