quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryهندسة الحاسبات schoolبكالوريوس event_available2026-07-14

السؤال

Transcribed Image Text:

CISC 1115 Examination #2 Name: 7. (10 pts) Draw a picture of array A, showing the values stored in it after execution of each code segment below. Use the following data: 0123456789 import java.util.Scanner; public class problem7 ( public static void main(String[] args) { intA= new int[4][2]; int k; //needed to use Scanner Class Scanner keyboard = new Scanner(System.in); for (int i=0; i<3; i++) for (int j=0;j<= 1; j++) A[i][j] = 0; for (int m = 1; m<10; m++) { System.out.print("Enter a number: "); k-keyboard.nextInt(); switch (k) { case 1: case 2: A[k][2-k] 10* k; = break; case 4: case 5: case 6: case 7: break; A[k/2][1] 5-k; array case 3: A[k-1][k-3] = 50; call countSixes a second break; default: A[3][k/6]=k; break; odified program ameters with the righ } keyboard.close(); }

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top