Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/venkat/old/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/venkat/old/iit2015002_1.c
#include<stdio.h>
#include<stdlib.h>
int max(int * a,int size);
void main(){
	int i,j;
	scanf("%d",&i);
	scanf("%d",&j);
	int * a=(int *) malloc(sizeof(int)*i*j);
	int x;
	for(x=0;x<(i*j);x++){
		scanf("%d",&a[x]);
	}
	printf("%d\n",max(a,i*j));
}
int max(int * a,int size){
	if(size!=0){
		int m=a[0];
		int n;
		for(n=1;n<=size;n++){
			if(a[n]>m)
				m=a[n];	
		}}
	return m;
	
}

ZeroDay Forums Mini