ࡱ> MOL[@ bjbj44 "*ViVi!!!!!Ln6:."."."."."+++5555555$7R96+_++++6."."1 (6I.I.I.+."."5I.+5I.$I.m.:a3,3.""" <!,3 14>60n63R:-:3:3H++I.+++++66vD?. vCS 1 AP Worksheet Arrays Name________________________ Use the following program segment to answer questions 1-10: ... public static void main(String [] args){ int [] N1 = new int[10]; double [] N2 = new double[24]; char [] N3 = new char[17]; int [] N4 = new int[10]; ... } The subscripts of array N3 are of type_____________ The elements of array N2 are of type ______________ The elements of array N4 are assigned the value______ How many elements (values) can array N1 contain? _____ How many elements (values) can array N2 contain? _____ How many elements (values) can array N3 contain? _____ How many elements (values) can array N4 contain? _____ How would you assign the value B to the first position in N3? How would you assign the value of 100 to each element in N1? How would you assign the value 13.5 to the 3rd location in N2? Use this declaration and diagram to answer #11 15: int[] Ex = new int[7]; Ex 1343763145910 What is the output for System.out.print(Ex[1]);? ____________ What is the output for System.out.print(Ex[3]);? ____________ What is the output for System.out.print(Ex[5]);? ____________ What is the output for System.out.print(Ex[7]);? ____________ What is the output for System.out.print(Ex[0]);? ____________ Fill in the arrays below: 16. Ex  for(k = 1; k<=5; k++) Ex[k] = k*k; 17. Ex  for(k = 6; k>=0; k--) Ex[6-k] = k; 18. Ex  for(k = 0; k<7; k++) Ex[k] = 4; 19. What is the output using the following array? Ex 152750118-1 N=0; for(k = 2; k<7; k++) N = N+Ex[k]; System.out.println(N); Declare an array that can hold 25 real numbers and call it grade. Write the code that will allow the user to enter the 25 grades into your array from #20. 22. Write the code that would average the numbers in the array called grade. u" - . J L & > d |   + - . 9 : ; C D E ƵƵƣԋzƵƵƵlllzhZhCJOJQJ^JaJ h9ph9pCJOJQJ^JaJ.jh9pCJOJQJU^JaJmHnHu#h9ph9pCJH*OJQJ^JaJ h9ph9pCJOJQJ^JaJh9pCJOJQJ^JaJh9pCJOJQJ^JaJh9phEmCJOJQJaJh9ph9pCJOJQJaJ(89uvz   ! " V . e    & Fgd9pgd9p   ] ^ _ ` $ &#$/Ifgd9p & Fgd9pgd9p gd9pkd$$Ifl֞T  T@@@@@@@ t 6 0644 la  M   " # . / 0 1 2 3 4 5 6 7 8 9 B D Ff0$ &#$/IfgdZhh^hgd9p & Fgd9pgd9pD E \ k l m u v w x y z { | } ~  Ff $ &#$/IfgdZhgdZhgd9pE F j n q r 4JKTUVZ[\d򴜴򴜴򴜴 h9phZhCJOJQJ^JaJ.jhZhCJOJQJU^JaJmHnHuhZhCJOJQJ^JaJ hZhhZhCJOJQJ^JaJhZhCJOJQJ^JaJ hZhhZhCJOJQJ^JaJhZhCJOJQJ^JaJ6 /7:=?AgdZhFf$ &#$/IfgdZhADFI$ &#$/IfgdZhIJSgdZhkd $$Ifl֞T  T@@@@@@@ t 6 0644 laSU[q6789:gd9pgd ! & Fgd !gdZhdehjs~Ӵ h9ph9pCJOJQJ^JaJhZhCJOJQJ^JaJh !CJOJQJ^JaJ hZhhZhCJOJQJ^JaJhZhCJOJQJ^JaJ 1h/ =!"#$%$$If!vh5@5@5@5@5@5@5@#v@:Vl t 6 65@$$If!v h5@5@5@5@5@5@5@5@5 @5 @#v @:Vl t 6 65 @5kd$$Ifl T  T@@@@@@@@@@ t 6 06((((44 la$$If!v h5@5@5@5@5@5@5@5@5 @5 @#v @:Vl t 6 65 @5kdg$$Ifl T  T@@@@@@@@@@ t 6 06((((44 la$$If!v h5@5@5@5@5@5@5@5@5 @5 @#v @:Vl t 6 65 @5kdB$$Ifl T  T@@@@@@@@@@ t 6 06((((44 la$$If!vh5@5@5@5@5@5@5@#v@:Vl t 6 65@@@@ NormalCJ_HaJmH sH tH DA@D Default Paragraph FontRi@R  Table Normal4 l4a (k@(No Listj@j 9p Table Grid7:V0*89uvz!"V.e]^_`M"#./0123456789BDE\klmuvwxyz{|}~/7:=?ADFIJSU[q6789:000x0x0x000x0x000x00x00x0x 0 0 0 0 0 0 0 000x 00x00 0 00x0x00000 0 0 0 0 0 00l 000x 0  0  0  0  00 00x00i 0i 0i 0i 0i 0i 0i 0i 0i 0i 0l 0@0000000@0i @0i @0i @0i @0i @0i @0i @0i @0i @0i @0l @0@0@0000 00@0i @0i @0i @0i @0i @0i @0i @0i @0i @0i @0l @0@0@000 @00 00 0 0 0i 0i 0i 0i 0i 0i 0i 0l 0 @000000  00 0  00 000089uvz!"V.e]^_`M./012345789BDEuvwxyz{|~7:=?ADFISU[q00000000000000000000000000000000 00 00 0 0 0 0 0 000 0000 0 000000000000000000 0  0  0  0  0 0 @0@0@0@0@0@0@0@0>;0?04W<;0?0<;0?0@0@0@0@0@0@0@0@0@0@0@0>{0?0<{0?0<{0?0@0@0@0>;0S0@0@0@0@0@0@0@0@0>{0?0<{0?0<{0?0@0@0@0>{0S0@0@0@0@0@0@0@0@0@0@0@0@0@0>{0S0 0E d D AIS  8@(  h  %\ & 3  "t  s *X99? "` %\ &B     % =&`B  c $D  %\ %n  %\ & C  "t  s *X99? "` %\ &B     % =&`B   c $D  %\ %n  %\ &  C  "t   s *X99? "` %\ &B      % =&`B   c $D  %\ %n  %\ & C  "t  s *X99? "` %\ &B     % =&`B  c $D  %\ %n  %\ & C  "t  s *X99? "` %\ &B     % =&`B  c $D  %\ %B S  ?9J8$t@8$t@ 8$t@8$t@8$t@&6dtw{|&7duFJ\`33333333333333333479:<=>?@ACDEFHIJUZdehjsy}~ rebeccageorgenAx4hpnvv^v`o(. ^`hH. L^`LhH. P P ^P `hH.   ^ `hH. L^`LhH. ^`hH. ^`hH. `L`^``LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.hpnAnS 7                   -?: fEm9p%Zh5H !;{L./0123456789uvwxyz{|}~7:=?ADFIJ@Pm@!!T@@UnknownGz Times New Roman5Symbol3& z ArialCFComic Sans MS?5 z Courier New"qh{{ j j !24d3QH)?HCS 1 AP Worksheet  Arrays rebeccageorge rebeccageorge  Oh+'0 , H T `lt|CS 1 AP Worksheet ArraysS 1rebeccageorgeeeebeebeNormalgrebeccageorgeee2beMicrosoft Word 10.0@NZ@(@bw j՜.+,0  hp   Katy ISDo { CS 1 AP Worksheet Arrays Title  !"#$%&'()*+,-./0123456789:;=>?@ABCEFGHIJKNRoot Entry F[<PData 1Table:WordDocument"*SummaryInformation(<DocumentSummaryInformation8DCompObjj  FMicrosoft Word Document MSWordDocWord.Document.89q