#include
void main()
{
int i,max,min,max_index,min_index;
int num[10];
clrscr();
printf("\n\n\n\t Program for finding Maximum & Minimum number from an
array");
printf("\n\n\n\t\t\t Enter any 10 Numbers");
for(i=0;i<10;i++)
{
printf("\n\n\t\t\t Enter number for num[%d] = ",i);
scanf("%d",&num[i]);
}
max=0;
min=num[0];
for(i=0;i<10;i++)
{
if(num[i]>max)
{
max=num[i];
max_index=i;
}
if(num[i]<=min)
{
min=num[i];
min_index=i;
}
}
printf("\n\n\t\t\t Maximum number is %d at index %d",max,max_index);
printf("\n\n\t\t\t Minimum number is %d at index %d",min,min_index);
getch();
}
Thanks Yarr add some program on trignometric Function..
ReplyDeletethank you
ReplyDeleteThanks Good Collection Keep it Up....
ReplyDeleteThanks Friends For Your Appreciations...
ReplyDeleteThanks Brother..Really Big Collection..Keep it Upe..Add Some Projects Please..
ReplyDeletei think this program is good but can you help me to write this same program in C++ lanuguage.............as soon as possible....
ReplyDeletethanks this program is also beneficial for me.......
thankz 22222222222222222 mch sir with the help of you and this program i hadn't faced any sort of problem thankz again
ReplyDeletehere always the min value is 0 ? :0
ReplyDeleteit awesomely works...ty
ReplyDeletethank u...........
ReplyDeleteprogram find max and min m*n matrix Sagar Zodage
ReplyDeleteif u want to any program solution then mail me zodagesagar@gmail.com
#include
#include
void main()
{
int m,n,i,j;
int a[50][50];
int max,min;
clrscr;
printf("\n Enter M * N ");
scanf("%d%d",&m,&n);
for(j=0;jmin) min=a[j][i];
}
}
printf("\n The Max Number Is=%d",max);
printf("\n The Min Number Is=%d",min);
getch();
}