Question

Write a C# program(s) using arrays Create a 2D array of integers [8,4] Create a 3D...

Write a C# program(s) using arrays

Create a 2D array of integers [8,4]

Create a 3D array of integers [4,4,2]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;

class MainClass {

public static void Main (string[] args) {

int[, ,] array3D = new int[4,4,2] {

{ {1,2},{3,4},{5,6},{7,9}},

{ {1,2},{3,4},{5,6},{7,9}},

{ {1,2},{3,4},{5,6},{7,9}},

{ {1,2},{3,4},{5,6},{7,9}},

};

Console.WriteLine(array3D[0,0,1]);


// 2-D array

int [,] array2D= new int[8,4]{

{1,2,3,4},

{1,2,3,4},

{1,2,3,4},

{1,2,3,4},

{1,2,3,4},

{1,2,3,4},

{1,2,3,4},

{1,2,3,4}

};

Console.WriteLine(array2D[0,1]);

}

}


Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
Write a C# program(s) using arrays Create a 2D array of integers [8,4] Create a 3D...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C programming Strictly - Write a program to sort an array of integers via arrays of...

    C programming Strictly - Write a program to sort an array of integers via arrays of pointers to those integers as shown in the figure. Problem 1 (68 points): Write a program to sort an array of integers via arrays of pointers to those integers as shown in the figure. The code should contain the following functions: 1)to randomly generate an array of integer numbers; 2) to allocate memory and build the arrays of pointers as shown in the figure...

  • Write a Program in C language for: 1. Create a C program to read 7 integers...

    Write a Program in C language for: 1. Create a C program to read 7 integers and store them in an array. Next, the program is to check if the array is symmetric, that is if the first element is equal to the last one, the value of the second one is equal to the value of the last but one, and so on. Since the middle element is not compared with another element, this would not affect the symmetry...

  • Write a C program that uses mallloc to create a 2D array. of c columns and...

    Write a C program that uses mallloc to create a 2D array. of c columns and r rows. Elements of array must be initialized to 0 and you must use malloc and free allocated memory fo array.

  • Write a program which takes 2 arrays of 10 integers each, a and b. c is...

    Write a program which takes 2 arrays of 10 integers each, a and b. c is another array with 20 integers. The program should put into c the appending of b to a, the first 10 integers of c from array a, the latter 10 from b. Then the program should display the array c, then find and display the Minimum value of the array c.

  • create a program with files, 1d array, 2d array, and vectors in c++ a single program

    create a program with files, 1d array, 2d array, and vectors in c++ a single program

  • in C++ Write a program which uses the following arrays: empID: An array of 7 integers...

    in C++ Write a program which uses the following arrays: empID: An array of 7 integers to hold employee identification numbers. The array should be initialized with the following values: 1, 2, 3, 4, 5, 6, 7. Hours: an array of seven integers to hold the number of hours worked by each employee. payRate: an array of seven doubles to hold each employee’s hourly pay rate. Wages: an array of seven doubles to hold each employee’s gross salary. The program...

  • In C++ for 2D Array: Write a program that uses a function that manipulates a 2D...

    In C++ for 2D Array: Write a program that uses a function that manipulates a 2D array of integers as follows: 1. Fill the first row and column in the array with random bits 2. Every subsequent cell should be filled as follows: 1. If the cells that are to the left and top of it are equal, then you should store their sum in it b. Otherwise, your program should store the highest among them. Test your function using...

  • JAVA ONLY 2D Arrays: You have been given a 10x10 array of integers, called Puzzle. You...

    JAVA ONLY 2D Arrays: You have been given a 10x10 array of integers, called Puzzle. You are to process the array, so that it verifies that each column’s elements are equal to the column’s index. That is, all elements in column 0 should be a 0, all elements in column 1 should be a 1, and so on. (Do not create the array, it is already created, no need to create main either)

  • Q1. Write a program in Java         a. Create 2 separate arrays, of user defined values,...

    Q1. Write a program in Java         a. Create 2 separate arrays, of user defined values, of same size         b. Add these 2 arrays. ........................................................................................................................... Q2. Write a program in java (using loop) input any10 numbers from user and store in an array. Check whether each of array element is positive, negative, zero, odd or even number. ............................................................................................................................ Q3. Write a program in Java to display first 10 natural numbers. Find the sum of only odd numbers. .............................................................................................................................. Q4....

  • C++ program Write a program which: 1. Enters data into the 2D array of integers which...

    C++ program Write a program which: 1. Enters data into the 2D array of integers which is 5x5 The data should be entered with an assignment statement using nested for loops that is do not scan in the data. The data should be: 1 2 4 8 16 1 3 9 27 81 1 4 16 64 256 1 5 25 125 625 1 6 36 216 1296 2. Print out the following using a nested for loop Row 0:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT