0

Please tell the error

this is the program- /*this program helps you to find the largest and the smallest integer from the values in the array*/ public class Array1 { public void largesmall(int v[]) { int i,n=5,large,small; large =v[0]; small =v[0]; for(i=0;i<n;i++) { if(v[i]>large) large =v[i]; else if(v[i]<small) small =v[i]; } System out.println("largest element="+large); System.out.prinltn("smallest element="+small); } }

6th Nov 2017, 11:10 AM
Shubh Mehrotra
Shubh Mehrotra - avatar
1 Answer
+ 3
https://code.sololearn.com/ciQYFnnOK1I8/?ref=app Try this.You missed main function and initialize or read values in array
6th Nov 2017, 11:20 AM
Muthumani V
Muthumani V - avatar