Maximum and Minimum of 'N' Numbers

You might also like

Download as pdf
Download as pdf
You are on page 1of 3
» | | MAXIMUM AND MINIMUM OF ‘N’? NUMBERS | | 1 to find minimum and maximum of n To write a C proj numbers usii ALGORITHM 1. Include the appropriate header files, start the main function and declare the variables. 2. Read the clement in array. 3. Let’s suppose the 1" element of as maximum set max =array[10]. 4. Set i-0. 5. If array [i]>max then set max=arrayli]. 6. Increment I by set i=i+1. 7. Respect step 4-5 till i #include void main() { int arr[100]; int imax,min,size; clrser(); DIBA An\W\te ttre REREAD, printf("\t\t\tMINIMUM AND MAXIMUM\n"); printf("\Q\i\trttteeesceeeeee gi, print{("Enter the size of array:\t"); scanf("%d" &size); printf(""Enter the element in the array\n' for(i=Osimax) max=arr{i]; ) itfarr|i}

You might also like