Computer Science, asked by padmarani06190, 13 hours ago

STATE THE OUTPUT OF THE FOLLOWING (JAVA)

int n = 91234,a, b, c, d, s;

a = n%100;

System.out.println(a);

b = n/1000;

System.out.println(b);

c = b%10;

System.out.println(c);

n = n/10;

d = n/100;

System.out.println(d);

s = a + b + c + d + n;

System.out.println(s);​

Answers

Answered by wondergirl10
0

Answer:

class ArrayDemo { public static void main(String[] args) { // declares an array of integers int[] anArray; // allocates memory for 10 integers anArray = new int[10]; // initialize first element anArray[0] = 100; // initialize second element anArray[1] = 200; // and so forth anArray[2] = 300; anArray[3] = 400; anArray[4] = 500; anArray[5] = 600; anArray[6] = 700; anArray[7] = 800; anArray[8] = 900; anArray[9] = 1000; System.out.println("Element at index 0: " + anArray[0]); System.out.println("Element at index 1: " + anArray[1]); System.out.println("Element at index 2: " + anArray[2]); System.out.println("Element at index 3: " + anArray[3]); System.out.println("Element at index 4: " + anArray[4]); System.out.println("Element at index 5: " + anArray[5]); System.out.println("Element at index 6: " + anArray[6]); System.out.println("Element at index 7: " + anArray[7]); System.out.println("Element at index 8: " + anArray[8]); System.out.println("Element at index 9: " + anArray[9]); }

Explanation:

please mark me as brainliest

Similar questions