Maximum

From , 4 Years ago, written in Java, viewed 54 times.
URL https://pastebin.vip/view/8c00dee2
  1. class B
  2. {  
  3. public static void main(String args[])
  4. {
  5. int i,min,max;
  6. int A[]={80,90,60,30,68};
  7. min=max=A[0];
  8. System.out.print("数组A的元素包括:");
  9. for(i=0;i<A.length;i++)
  10. {
  11. System.out.print(A[i]+" ");
  12. if(A[i]>max)
  13. max=A[i];
  14. if(A[i]<min)
  15. min=A[i];
  16. }
  17. System.out.println("\n数组的最大值是:"+max);
  18. System.out.println("数组的最小值是:"+min);
  19. }
  20. }

Reply to "Maximum"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website