nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
309 B
1
Indexable
Never
public class veeru1  {    
	public static void main(String[] args){	
		int entering[]={7,0,5,1,13};
		int leaving[]={1,2,1,3,4};
		int hr=5;
		int max=0;
		int tmp=0;
		for(int i =0;i<hr;i++){
			tmp=(tmp+entering[i])-leaving[i];
			
			if(tmp>max)max=tmp;
		}
		System.out.println(max);
	}
}	

nord vpnnord vpn
Ad