hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* WRITE A C PROGRAM TO FIND MAXIMUM NUMBER OF GIVEN ARRAY ELEMENTS */
#include<stdio.h>
#include<conio.h>
void main()
{
int a[5],i,max;
clrscr();
printf("enter any five number :\n");
for(i=0; i<5; i++){
scanf("%d",&a[i]);
}
max=a[0];
for(i=0; i<5; i++){
if(max < a[i]){
max=a[i];
}
}
printf("largest ans : %d\n",max);
getch();
}
/* OUTPUT */
============================
enter any five number :
20
30
10
40
20
largest ans : 40
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment