Document1.txt

  • Uploaded by: karan singh
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Document1.txt as PDF for free.

More details

  • Words: 47
  • Pages: 1
import java.util.* class ArrayLargeAndSmall { int []a; //instance variable public static void main(String a[]) { ArrayLargeAndSmall oa=new ArrayLargeAndSmall(); oa.findOutLargeAndSmall(); } ArrayLargeAndSmall() { Scanner inp=new Scanner(System.in); System.out.print("Enter } void findOutLargeAndSmall() { int large=a[0]; int small=a[0]; for(int i=0;ilarge) large=a[i]; if(a[i]<small) small=a[i]; } System.out.println("largest no"+large); System.out.println("Smallest number"+small); }

More Documents from "karan singh"