logistic_guy
Senior Member
- Joined
- Apr 17, 2024
- Messages
- 2,213
Consider a \(\displaystyle 2\)-by-\(\displaystyle 3\) integer array \(\displaystyle \text{t}\).
\(\displaystyle \bold{a)}\) Write a declaration for \(\displaystyle \text{t}\).
\(\displaystyle \bold{b)}\) How many rows does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{c)}\) How many columns does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{d)}\) How many elements does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{e)}\) Write the names of all the elements in row \(\displaystyle 1\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{f)}\) Write the names of all the elements in columns \(\displaystyle 2\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{g)}\) Write a single statement that sets the element of \(\displaystyle \text{t}\) in the first row and second column to zero.
\(\displaystyle \bold{h)}\) Write a series of statements that initialize each element of \(\displaystyle \text{t}\) to zero. Do not use a loop.
\(\displaystyle \bold{i)}\) Write a nested for statement that initializes each element of \(\displaystyle \text{t}\) to zero.
\(\displaystyle \bold{j)}\) Write a statement that inputs the values for the elements of \(\displaystyle \text{t}\) from the keyboard.
\(\displaystyle \bold{k)}\) Write a series of statements that determine and print the smallest value in array \(\displaystyle \text{t}\).
\(\displaystyle \bold{l)}\) Write a statement that displays the elements in row \(\displaystyle 0\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{m)}\) Write a statement that totals the elements in column \(\displaystyle 3\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{n)}\) Write a series of statements that print the array \(\displaystyle \text{t}\) in neat, tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.
\(\displaystyle \textcolor{indigo}{\bold{C++}}\)
\(\displaystyle \bold{a)}\) Write a declaration for \(\displaystyle \text{t}\).
\(\displaystyle \bold{b)}\) How many rows does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{c)}\) How many columns does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{d)}\) How many elements does \(\displaystyle \text{t}\) have?
\(\displaystyle \bold{e)}\) Write the names of all the elements in row \(\displaystyle 1\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{f)}\) Write the names of all the elements in columns \(\displaystyle 2\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{g)}\) Write a single statement that sets the element of \(\displaystyle \text{t}\) in the first row and second column to zero.
\(\displaystyle \bold{h)}\) Write a series of statements that initialize each element of \(\displaystyle \text{t}\) to zero. Do not use a loop.
\(\displaystyle \bold{i)}\) Write a nested for statement that initializes each element of \(\displaystyle \text{t}\) to zero.
\(\displaystyle \bold{j)}\) Write a statement that inputs the values for the elements of \(\displaystyle \text{t}\) from the keyboard.
\(\displaystyle \bold{k)}\) Write a series of statements that determine and print the smallest value in array \(\displaystyle \text{t}\).
\(\displaystyle \bold{l)}\) Write a statement that displays the elements in row \(\displaystyle 0\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{m)}\) Write a statement that totals the elements in column \(\displaystyle 3\) of \(\displaystyle \text{t}\).
\(\displaystyle \bold{n)}\) Write a series of statements that print the array \(\displaystyle \text{t}\) in neat, tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.
\(\displaystyle \textcolor{indigo}{\bold{C++}}\)