Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Test expression



Header file



Comment



Working with switch case



Iterative statement




Array_find largest of N numbers




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int i,n,arr[1000],max=-1; pf("Enter the number of the element in the array: "); scanf("%d",&n); pf("\nEnter array element: "); for(i=0;i < n;i++) { scanf("%d",&arr[i]); //taking array element max=arr[i]>max?arr[i]:max; //shaking every number is maximum or not } //printing final maximum value pf("\nThe MAXIMUM number is: %d",max); return 0; }
OUTPUT:


© 2018 - All rights reserved